PDA

View Full Version : ParamWire Orientation and rotation constraints


AeronMiles
10-16-2008, 11:15 AM
Hi guys,

I am writing a script to add a ca to some car animation rigs with the goal of writing the whole rig into mxs including wiring parameters and conditions etc.

I am trying to link a slider to two pivot points very similar to an fk/ik setup with 3 bones. I want the slider to blend the main bone to one pivot point i.e. bone 1 when it's between -90 and 0 and then the other bone 2 between 0 and 90 using orientation and position constraints. This is to create the effect of a car rolling using it's left and right wheels as pivot points.

this is part of my code which is returning the subanims error:

paramWire.connect $.modifiers[#PEN_Attribute_Holder_2].Stan_Movement[#Roll] $CNT06.rotation.controller.weight[1] "Roll"

I have been trying to use getsubanimnames but can't seem to find the code specific to the constraints. getsubanimnames $[#weights] returns -- Type error: Call needs function or class, got: undefined.

Does anyone have any ideas of the code I would use to link these parameters and how this would fit into an If statement?


Many thanks,

Aeron

P.s. thanks PEN for some awesome tutorials and scripts!

PEN
10-17-2008, 01:33 PM
try something more like

getSubAnimNames $CNT06.rotation.controller

then add the named parameters on to the end of that line. $[#weights] is not the part to the weights of the constraint.

AeronMiles
10-20-2008, 01:03 PM
Many thanks Paul,

Here's a couple of parameter wire to subanim code I have used just incase this can help anyone:

paramWire.connect $.modifiers[#PEN_Attribute_Holder_2].Stan_Movement[#Body_Roll] $CNT_Body_Stan.rotation.controller[#orientation_weight_1] "If Body_Roll > 0 then 100 else 0"

paramwire.connect $.modifiers[#PEN_Attribute_Holder_2].Stan_Movement[#Drift_Angle] $CNT_Drift_Stan.rotation.controller.Euler_XYZ.controller[#Z_Rotation] "-Drift_Angle"

CGTalk Moderation
10-20-2008, 01:03 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.