ScriptSpot home

Using Regex in 3dsMax

External download
Report a problem
Community reviewsNo reviews yet.

Listing details

Date updated
Legacy votes
1
Listing created
Posted by

LoneRobot

More by this author

Description

There used to be two things in life that truly scared me. One was the soundtrack from Frozen. The other was Regular Expressions. Find out which one I said "Let it go" to...

Comments (1)
3dwannab

Thank you.

I've created an example whereby it strips any bitmap filename including path if missing so you don't get that pop up at the beginning when you open the file.


OldString =@".*"
MapArray = getClassInstances BitmapTexture
for o in MapArray where doesFileExist(o.filename) == false do (
	rgx = dotnetObject "System.Text.RegularExpressions.Regex" OldString
	filename = rgx.Replace o.filename ""
	o.filename = Filename
	ATSOps.Refresh()
)
.*

matches any character (Greedy)