Thursday, 7 April 2011

Extra: The Picker...

I am using a simple picker script which makes it easier to grab hands and other joints etc.
It is basically referencing the bone name with a button and combine groups of bones to a button and select them.

Max Script Code for my specific script:


rollout littlePicker "Little Picker";
(
/* Assign buttons the name and postion */
button btn2 "L Antenna" pos:[8,16] width:56 height:20
button btn1 "R Antenna" pos:[89,16] width:56 height:20
button btn4 "L Hand" pos:[8,120] width:56 height:20
button btn3 "R Hand" pos:[88,120] width:56 height:20
button btn6 "L Foot" pos:[8,176] width:56 height:20
button btn5 "R Foot" pos:[88,176] width:56 height:20
button btn7 "Master" pos:[40,216] width:72 height:24
button btn8 "Select All" pos:[40,256] width:72 height:32
button btn9 "Head" pos:[48,64] width:56 height:20

/* Button functions  */
/* Antenna R */
on btn1 pressed  do
(
/*clear the selection to make sure that nothing other is selected */
clearSelection()
/*select the right antenna bones */
select #($A_Bone_Right_3,$A_Bone_Right_2,$A_Bone_Right_1)
)
/* Antennas L */
on btn2 pressed  do
(
clearSelection()
select #($A_Bone_Left_3, $A_Bone_Left_2,$A_Bone_Left_1)
)
/* Head*/
on btn9 pressed  do
(
clearSelection()
select $Circle001
)
/* Hand R */
on btn3 pressed  do
(
clearSelection()
select $Rectangle002
)
/* Hand L */
on btn4 pressed  do
(
clearSelection()
select $Ctrl_L_Hand_Master
)
/* Foot R */
on btn5 pressed  do
(
clearSelection()
select $Ctrl_Foot_R
)
/* Foot L */
on btn6 pressed  do
(
clearSelection()
select $ctrl_foot_L
)
/* Master Ctrl Select */
on btn7 pressed  do
(
clearSelection()
select $CTRL_MASTER
)
/* Select All */
on btn8 pressed  do
(
clearSelection()
select #($Circle002, $Circle003, $CTRL_MASTER, $rightKnee, $leftKnee, $Ctrl_Elbow_L001, $Ctrl_Elbow_L, $Ctrl_Pelvis_Master, $Ctrl_Spine_Hip, $Ctrl_Left_Shoulder, $Ctrl_Right_Shoulder, $ctrl_foot_L, $Ctrl_Foot_R, $Ctrl_L_Hand_Master, $Ctrl_Hand_L, $Ctrl_HandControl_R, $Rectangle002, $Ctrl_Eye, $Ctrl_Eye_R, $Ctrl_Eye_L, $Ctrl_spineBot, $Ctrl_spineTop, $Ctrl_spineMid, $Circle001, $Ctrl_Neck, $Bone053, $Bone058)
)
)
/* create the picker dialog with width and height attributes */
createDialog littlePicker 162 300

No comments:

Post a Comment