reForm
08-21-2008, 04:09 PM
I'm trying to animate an escalator with sliders to control the speed. The problem is that I need to write a script to apply a path controller to every step with the correct wire parameter formula.
My problem is that I can't close the parameterwire dialog from maxscript after each wiring operation... resulting in the script failing when the maximum number of dialogs max allows being open. Is there a way to apply the controller and paramwire without opening the paramwire dialog?
My script is currently:-
no_steps = $.count
float percent_div
percent_div = 100/no_steps
for i = 1 to $.count do (
str= "(percent*$slider01.value)+("+ percent_div as string +"*"+ i as string +")"
print str
$[i].pos.controller = path follow:false
$[i].pos.controller.path = $PTH_ESC_STEP
paramWire.connect $CTRL_STEP.pos.controller[#percent] $[i].pos.controller[#percent] str
)
There is probably a more sensible approach to this kind of problem, so please tell if you know it!
My problem is that I can't close the parameterwire dialog from maxscript after each wiring operation... resulting in the script failing when the maximum number of dialogs max allows being open. Is there a way to apply the controller and paramwire without opening the paramwire dialog?
My script is currently:-
no_steps = $.count
float percent_div
percent_div = 100/no_steps
for i = 1 to $.count do (
str= "(percent*$slider01.value)+("+ percent_div as string +"*"+ i as string +")"
print str
$[i].pos.controller = path follow:false
$[i].pos.controller.path = $PTH_ESC_STEP
paramWire.connect $CTRL_STEP.pos.controller[#percent] $[i].pos.controller[#percent] str
)
There is probably a more sensible approach to this kind of problem, so please tell if you know it!
