PDA

View Full Version : paramwire question


Polimeno
05-28-2008, 08:34 PM
iīve got a little problem to do paramwire in maxscript...

i have a $box with a check box inside CAttribute and i want to control the value of a weight rotation script from $cylinder with it..........

my try :
http://img.photobucket.com/albums/v205/RNThead_3D/VIDEOS/wireparam_checkbox_problem_.gif


s1 = selection[1]
s2 = selection[2]
paramwire.connect s1.modifiers[1].T_Delay[#_active] s2.rotation.controller.weight[#3]
"if (_active) == 0 then 0 else 1"
-- Type error: array index must be positive number, got: , got: #3


s1 = selection[1]
s2 = selection[2]
paramwire.connect s1.modifiers[1].T_Delay[#_active] s2.rotation.controller[#Weight__Rotation_Script] "if (_active) == 0 then 0 else 1"
-- Runtime error: connect requires subAnims

what am i doing wrong ?

*note: my tracks are (1 Frozen_rotation, 2 Zero_Euler_XYZ, 3 Rotation_script)

thks.

Polimeno
05-30-2008, 01:19 AM
please,
what should i have to do ??

ZeBoxx2
05-30-2008, 03:29 AM
where it complains about wanting a positive number (more precisely, a value >= 1), your code is using "weight[#3]" - use "weight[3]" instead if you want the third item in the weights.

Polimeno
05-30-2008, 06:41 AM
didnīt work either.....same problem....
=/...

http://img.photobucket.com/albums/v205/RNThead_3D/VIDEOS/paramwire_problem.gif


s1 = selection[1]
s2 = selection[2]
paramwire.connect s1.modifiers[1].Test_active[#active] s2.rotation.controller.weight[3]
"if (active) == 0 then 0 else 1"

-- Runtime error: connect requires subAnims


please,
what is the tricky to do it right ??

ZeBoxx2
05-30-2008, 02:21 PM
well, as the error says, one or both of the parameters you're trying to wire is not specified as a subAnim.

I'd say the weight one; that returns the actual weight value.. you want to access the controller for the appropriate weight instead;


paramwire.connect s1.modifiers[1].Test_active[#active] s2.rotation.controller.weightS[3]

PEN
05-30-2008, 02:26 PM
Best thing to do is use getSubAnimNames to find the path that you need to the tracks. Try this...

getSubAnimNames $
#(#visibility, #Space_Warps, #transform, #Object__Sphere, #material, #Image_Motion_Blur_Multiplier, #Object_Motion_Blur_On_Off) --Returns

getSubAnimNames $[#transform]
#(#position, #rotation, #scale) --Returns

getSubAnimNames $[#transform][#position]
#(#Frozen_Position, #Zero_Pos_XYZ, #available, #Weights) --Returns

getSubAnimNames $[#transform][#position][#Weights]
#(#Weight__Frozen_Position, #Weight__Zero_Pos_XYZ) --Returns

getSubAnimNames $[#transform][#position][#Weights][#Weight__Zero_Pos_XYZ]
#() --Returns

Any one of those is a valid paramWire parameter. I tend to do it that way more these days as I know the names of the tracks usualy.

Polimeno
05-30-2008, 05:29 PM
EDIT:

Paul,
tried it :


getSubAnimNames $[#transform][#position][#Weights]
#(#Weight__Frozen_Position, #Weight__Zero_Pos_XYZ) --Returns

Listener :
#(#Weight__Frozen_Position, #Weight__Zero_Pos_XYZ, #Weight__Spring)
#(#Weight__Frozen_Position, #Weight__Zero_Pos_XYZ)
OK



fromObj = selection[1]
toseL = selection[2]
paramWire.connect fromObj.modifiers[1].Test[#active] toseL.pos.controller[#Weight__Spring] "if(active) == 0 then 0 else 1"


-- Runtime error: connect requires subAnims

why still wrong ???
oO?

Polimeno
05-31-2008, 02:04 AM
EDIT:

nobody ?

Polimeno
05-31-2008, 09:04 PM
delete, please...

CGTalk Moderation
05-31-2008, 09:04 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.