PDA

View Full Version : Finger scripting


PhantomDgn
03-27-2007, 09:07 PM
ok So i'm rigging my character (trying to make it as useful as possiable) and came up with teh idea of adding Custom attributed for the finger controlls. I'm not all that keen on scripting but this is what i got so far. but i'm stumped. I want 4 buttons efauly, fist, point and thumbs up. also i want to have sliders to controll each finger joint. these sliders wil be wired or reaction manager applied and will be what the buttons will change when their pressed.

Can someone take a look at my code and see if it makes sence?


hand_cont = attributes hand_controlls
(
parameters hand_controlls rollout: fingers
(
'hand_controllers' type:#float ui:finger_sliders animatable:true
)
rollout finger_roll "Finger Options"


group"Preset Poses:"
(
button default "Default" tall:2 across:2 width: 65
button fist "Fist" width: 65
button thumb "Thumbs Up" width: 65
button point "Point" width: 65
)
on default pressed do
(



)

on fist pressed do
(



)

on thumb pressed do
(



)

on point pressed do
(



)

group "Thumb:"
(
slider T_B "Thumb Base:" range:[0,100,0] ticks:0
slider T_M "Thumb Middle:" range:[0,100,0] ticks:0
slider T_T "Thumb Tip:" range:[0,100,0] ticks:0
)

group "Pointer:"
(
slider P_B "Pointer Base:" range:[-50,100,0] ticks:0
)
(
slider P_M "Pointer Middle:" range:[-50,100,0] ticks:0
)
(
slider P_T "Pointer Tip:" range:[-50,100,0] ticks:0
)

group "Middle:"
(
slider M_B "Middle Base:" range:[-50,100,0] ticks:0
)
(
slider M_M "Middle Middle:" range:[-50,100,0] ticks:0
)
(
slider M_T "Middle Tip:" range:[-50,100,0] ticks:0
)

group "Ring:"
(
slider R_B "Ring Base:" range:[-50,100,0] ticks:0
)
(
slider R_M "Ring Middle:" range:[-50,100,0] ticks:0
)
(
slider R_T "Ring Tip:" range:[-50,100,0] ticks:0
)

group "Pinky:"
(
slider P_B "Pinky Base:" range:[-50,100,0] ticks:0
)
(
slider P_M "Pinky Middle:" range:[-50,100,0] ticks:0
)
(
slider P_T "Pinky Tip:" range:[-50,100,0] ticks:0
)

)

custAttributes.add $Finger_Controlls.modifiers[1] hand_cont

peepshow
04-01-2007, 01:07 AM
hmmm, i hate scripting to..cant really help u there..but i can tell you how to do it manually if u want...with only 4 custom attributes it wouldnt take that long!! or do u really need to do it with a script??
oh and what software are u using?

PhantomDgn
04-01-2007, 05:39 AM
I think i need to use scripting yes. I want the 4 buttons to controll the values of the sliders when pressed. the only way i can think of doing that is through scripted attribuets

CGTalk Moderation
04-01-2007, 05:39 AM
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.