View Full Version : Custom Attributes and Parameter Wires

12 December 2008, 04:28 PM
I currently have a series of face controls which are wired to face bones, using some fairly basic math, such as dividing the position of the control in one axis by a value.

This works fine for me, but Im trying to move this away from being a hardcoded value so I have created a series of custom attributes which I would now use in the wire instead of a hardcoded value (thereby in theory allowing me to change the value on the attribute interactively and see the difference this change makes on the position / rotation of the bone as the control object moves.).

I have the following syntax;

paramWire.connect $Jaw_Out_ControlHandle.pos.controller.Zero_Pos_XYZ.controller.Y_Position.controller[#Limited_Controller__Bezier_Float] $Face_Jaw.pos.controller.Zero_Pos_XYZ.controller.Y_Position.controller[2] ("(Limited_Controller__Bezier_Float /($Facial_Controls.modifiers[1].JawOut_Yp_Jaw_Yp))" )

This is wiring the Y Pos of my Jaw_Out_Control object to the Y Pos of the Jaw bone and using the Facial_Controls first modifier attribute JawOut_Yp_Jaw_Yp.

This evaluates fine, BUT, and its a biggie, if i change the value on the attribute I need to open the wiring parameters dialog and click update.

Does anyone know of a way I can get this update to occur automatically if the attribute is changed?

Hope that makes sense!

12 December 2008, 04:49 PM
You using param wire incorrectly. You should never be referring to an object by name at any time in your rigs and setups. Param wires can only take one input and control the track that they are on. To do what you are after you are going to have to use script controllers and have two variables created that point to Limited_Controller__Bezier_Float and $Facial_Controls.modifiers[1].JawOut_Yp_Jaw_Yp. Since this is a reference to these two tracks it will be faster and will not break if you rename anything. General rule of thumb, if you ever start to type the name of an object in a script controller, param wire or any other real time controller, STOP, there is a better way.

CGTalk Moderation
12 December 2008, 04:49 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.