PDA

View Full Version : enable/disable IK


ReneAlex
08-02-2004, 03:08 PM
there is a way to get accses to the node operator that controls the enable/disable IK funcion in the ik chain obj?

... let say a want to add a CA to a shape to enable/disable an ik chain, and avoid, dig around, select the ik chain, then the motion panel to get FK rotations.

I ask here because its seems to be looked in a "system only" kind of way and I cant find anything in the script ref to get acceses to it.

cant anyone tell me if there is a way to to this... or maybe I am too lazy :P...

ReneAlex
08-02-2004, 04:03 PM
Fred Moreau has made a script that allows to put a shortcut in the quad...

maybe this is the way to go... it only work when to have selected the ik chain, I supouse that it can be modificated to work with any ik chain, not just the seleted one... but ... if some veteran "scripter" has some advise please share...

thx


here the script ... ( Author: Fred Moreau )

macroScript IK_ONOFF_TOGGLE
ButtonText:"IK Solver On/Off Toggle"
category:"www.fredmoreau.net (http://www.fredmoreau.net)"
Tooltip:"IK Solver On/Off Toggle"
(
On IsVisible Return (classof $ == IK_Chain_Object) -- applies to IkSolvers only
on ischecked Do (if $.controller.enabled == 1.0 then true else false) -- returns current state

On Execute Do
(
-- change state
if $.controller.enabled == 1.0 then $.controller.enabled = -1.0 else $.controller.enabled = 1.0
)
)

PEN
08-02-2004, 04:54 PM
there is a way to get accses to the node operator that controls the enable/disable IK funcion in the ik chain obj?

... let say a want to add a CA to a shape to enable/disable an ik chain, and avoid, dig around, select the ik chain, then the motion panel to get FK rotations.

I ask here because its seems to be looked in a "system only" kind of way and I cant find anything in the script ref to get acceses to it.

cant anyone tell me if there is a way to to this... or maybe I am too lazy :P...
$.controller.enabled=1 or = 0

This should get you what you are looking for. You will have to use this in a script controller or write it into the CA def as part of the event for the check button.

ReneAlex
08-02-2004, 06:16 PM
I figure out thank you...

CGTalk Moderation
01-18-2006, 09:00 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.