HornBerger
01-16-2010, 08:37 PM
hi,
custom attributes are user defined parameters assigned to objects in 3d studio max the value of these parameters can be modified by ui controls specified in the attribute definition (ui controls like spinner and slider etc.. ) these parameters can then be wired to control the transformation or modification of other 3d objects
for eg:
--script by charles purpose to demonstrate custom attributes
/* after running the script select the red box in scene and ope the modify panel to see a new rollout called uniform scale*/
resetMaxFile #noprompt
thebox = box length:10 width:10 height:10 pos:[0,0,0] wirecolor:red
my_Attr = attributes scale
(
parameters param rollout:scaler
(
uscale type:#float ui:scaleSp
)
rollout scaler "Uniform scale Rollout"
(
spinner scaleSp "Uniform Scale" range:[-100,100,100] fieldwidth:60
)
)
custattributes.add $box01 my_Attr -- adds the attribute to box01
select $box01
paramWire.connect $.baseObject.scale[#uscale] $.transform.controller[#Scale] "[uscale,uscale,uscale]"
$.uscale = 1
this is all fine and dandy but now i wont to know how to add such custom attributes to the command panel so i can have my own custom rollouts in the create panel
any help is appreciated! thanks
custom attributes are user defined parameters assigned to objects in 3d studio max the value of these parameters can be modified by ui controls specified in the attribute definition (ui controls like spinner and slider etc.. ) these parameters can then be wired to control the transformation or modification of other 3d objects
for eg:
--script by charles purpose to demonstrate custom attributes
/* after running the script select the red box in scene and ope the modify panel to see a new rollout called uniform scale*/
resetMaxFile #noprompt
thebox = box length:10 width:10 height:10 pos:[0,0,0] wirecolor:red
my_Attr = attributes scale
(
parameters param rollout:scaler
(
uscale type:#float ui:scaleSp
)
rollout scaler "Uniform scale Rollout"
(
spinner scaleSp "Uniform Scale" range:[-100,100,100] fieldwidth:60
)
)
custattributes.add $box01 my_Attr -- adds the attribute to box01
select $box01
paramWire.connect $.baseObject.scale[#uscale] $.transform.controller[#Scale] "[uscale,uscale,uscale]"
$.uscale = 1
this is all fine and dandy but now i wont to know how to add such custom attributes to the command panel so i can have my own custom rollouts in the create panel
any help is appreciated! thanks
