ScriptSpot

Forum topic · General Scripting

Maxscript Custom Attribute buttons not working

By kenpitts · 2016-11-28

Description

I need some help. I'm new to Maxscript (can script, just new to Maxscript).

I have been staring at my code for hours and I can't figure out why my buttons do nothing. Any help would be much appreciated.

ca = attributes Test
(
parameters IKParameter rollout:IKFKRollout
(
)

rollout IKFKRollout "FK / IK Controls"
(
group "Left Leg"
(
button IKButtonL "IK to FK" align:#left across:3
label FKIKTextL "Match" offset:[0,5]
button FKButtonL "FK to IK" align:#right
)
)

on IKButtonL pressed do
(
print "IK to FK"
)

on FKButtonL pressed do
(
print "FK to IK"
)
)

custAttributes.add $'BodyCTRL' ca

Comments (1)

bracket in wrong place...

vusta · 2016-11-30

just before

on IKButtonL pressed do

delete one closing bracket, then add one closing bracket at bottom before custAttributes.add $'BodyCTRL' ca

(don't say nuffin'...i'm a maxscript noob)