Self explanatory really. Arrays sort of scare me but I'll get them down eventually but I'm sure this is a case where I can collect the Modifiers.name and then send that to the object name resulting in a final result for the objects name to be "Ball_Mod_Noise" "'Ball_Mod_UVW Map" etc.
My efforts so far collect modifiers array:
ModCollect = with printAllElements on sort (for c in modifier.classes collect if c.creatable then (c()).name else c.localizedname) as string-------------------------------
This code though below works to rename the objects but not good when there are so many modifiers, need something more dynamic. If I could replace
uvwmap here with something for the
o.namethen that would be great.
NewMaxFileName = "MAX"
modPrefix = "_Mod"
for o in objects where classof o.modifiers[1] == uvwmap do o.name = NewMaxFileName + modPrefix + "_UVWMap" as string= MAX_Mod_UVWMap
Thanks in advance.
-----------------------SOLUTION---------------------------
for o in objects do (
for m in o.modifiers do (
if classof m != undefined do (
o.name = o.modifiers[1].name
)
)
)Probably could be shortened but I'm hapy for now :D
By 3dwannab · 2015-05-27