PDA

View Full Version : [3DSmax] Script hide controlers Ik/Fk


Boslo
03-17-2009, 02:07 PM
hi everyone,

I made an arm set up that uses IK and FK. I would like to hide a controler when I switch Ik/fk

I have found the script : http://forums.cgsociety.org/showthr...&highlight=fkik

I am beginner to Maxscript. My script is :


ca=custAttributes.getDef $.modifiers[1].L_HandControl_ctl
attributes HandControl
redefine:ca
(
parameters ikfk rollout: ikfk_Roll
(
'ikfkBlend' type:#float ui:ikfk animatable:true
)
rollout ikfk_Roll "Switch Ik Fk"
(
slider ikfk "IK FK" width:100 Align:#Center range:[0,100,0] ticks:0
)

if L_HandControl_ctl.ikfkBlend = 0 do
(hide $L_UpperArmFk_ctl)

if L_HandControl_ctl.ikfkBlend = 100 do
(unhide $L_UpperArmFk_ctl)
)
custAttributes.add $.modifiers[1] ca

My idea is a condition : if the float "ikfkblend" is 0 my controler is hide, or 100 is unhide.

Thanks in advance.

PS : Sorry for my english, i'm french.

ErikE
03-19-2009, 07:01 PM
Just at a quick glance I noticed that in:


if L_HandControl_ctl.ikfkBlend = 0 do
(hide $L_UpperArmFk_ctl)

if L_HandControl_ctl.ikfkBlend = 100 do
(unhide $L_UpperArmFk_ctl)


should be == instead of =

CGTalk Moderation
03-19-2009, 07:01 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.