View Full Version : Adding an Attribute Holder through Maxscript (Pen Attribute Holder too)?
01-19-2009, 02:28 PM
Hi everyone, quick question.
I've been looking through the maxscript reference and I can't seem to find the right way to add a custom attribute holder on an object through maxscript. Can anybody fill me in on that please. Thanks a lot.
Also, i have the Pen Attribute Holder install on my Max and maybe i'd rather add that attribute holder instead of 3DS Max default attribute holder. Can i do that?
Thanks for you time.
01-19-2009, 02:46 PM
may that be what ur looking for?
weaponDataCA = attributes weaponData
parameters main rollout:params
hitPoints type:#float ui:hits default:10
cost type:#float ui:cost default:100
rollout params "Weapon Parameters"
spinner hits "Screw" type:#float
spinner cost "this" type:#float
dropdownlist sound_dd "I'm" items:#("Out", "sparkle", "zap", "fizzle")
on sound_dd selected i do sound = sound_dd.items[i]
01-19-2009, 04:45 PM
Hi Insanto, i'm not looking to defining my attribute holder but simply adding one like this for example.
addModifier $ myBend
It's pretty simple, but i can't seem to find how to do it with an attribute holder. I keep looking into the Maxscript Reference but i don't find exactly how the call the Attribute Holder modifier.
Thanks for you time
It definitly can be found in the manual:
custAttributes.add selection.modifiers['your modifier name' or index] WeaponDataCA
To be able to create modifiers you need to know their class. One way to get that is to use the help the other is to create the modifier by hand and check what the class is, so...
theModClass=classOf $.modifiers --Will get the class of the top modifier on a selected object.
Then you can use this to create modifiers.
In the case of the attrbute holder the class is
And for PAH you need to take into account the space that I put in the name, something that you should never do by the way.
--The class of the modifier
--Create the modifier with the class name
The full thing would look something like...
addModifier $ PAH
custAttributes.add PAH def
01-19-2009, 07:13 PM
Cool! Thanks a lot :)
01-19-2009, 07:13 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.