PDA

View Full Version : toolbar with expressions?


kidult one
08-28-2006, 04:18 PM
HI
I have written an expression and used custom parameter sliders to control values in it. How can i apply this whole setup to another object? I made a button for the custom parameter set but cant seem to make one for the expressions? I cut and paste the command from the script editor but get an error when i try run it. the expression is on a scale or transfrom prop and i have replaced the cube with object in the script editor.
An all in one solution would be even better - just one button that applies parameter set and expressions?.

grahamef
08-28-2006, 06:01 PM
To create an expression, you can use the SetExpr command (or if you are using the object model, Parameter.AddExpression).

To get an all-in-one script, it depends on how you are applying the custom parameter set. If you created the button simply by dragging a preset onto a toolbar, then the button is just a preset and has no associated script. You need to replace this by a script that applies the preset to the selected object using AddProp (or SceneItem.AddProperty in the object model). Once you have that, you can add the scripting code to set the expression.

kidult one
08-28-2006, 08:13 PM
thanks - bit of a noobie with the scripting but will try!

CGTalk Moderation
08-28-2006, 08: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.