How can I add a custom Parameter to a box in maxscript?

1.8k views Asked by At

I would like to add a parameter named initialPosx that I can use in this manner:

a = box
a.initialPosx = n

Is there any way?

1

There are 1 answers

0
Swordslayer On BEST ANSWER

Read Scripted Custom Attributes and Scripted Plug-in Clauses topics. In your case, a trivial example would be:

a = Box()
attr = attributes attr (parameters main (initialPosX type:#point3))
custAttributes.add a attr
a.initialPosX = [5, 10, 0]