do something based on object name prefix
hello
i´m struggling with some basic concepts lately
what i am trying to do is do something based on the object name prefix..
i am trying something like this:
for o in selection as array do if o.name == 'Box'* do print "it works!"
but the * dosnt work with the == signal i i think
any help on this is greatly apreciated
Comments
Pathname Literals
Search in the mxs-help for "Pathname Literals" topic. For ex.:
$*box*
- will collect all objects with 'box' (at any place) of their names, like: "the_box01", "boxer", etc., while$box*
will collect all with prefix (starting with) 'box' name.For more precision tests check
matchPattern()
function.Cheers!
my recent MAXScripts RSS (archive here)
Thank you Anubis.. i belive
Thank you Anubis..
i belive matchPattern is what i wanted
for o in selection as array do if (matchPattern o.name Pattern:"*Box*") == true do print "it works!"