PDA

View Full Version : reset pose button


Illusion-shadow
03-17-2006, 05:37 AM
How do you create a reset pose button like Paule Neale's Maxine character? I don't need nothing fancy and I don't mind typing everying controller in to the attributes. I have already zero out all my controller. Any ideas? Thanks!

Illusion-shadow
03-17-2006, 09:42 PM
Okay, I figure it out myself, but I am sure there are easlier and better way to do it. The method I am using will work, but you can also break it if the animator mess with the skin pose. Okay here is the script.

button resetHead "Head"

on resetHead Pressed do
(
$CNT_Head.assumeskinPose()
$CNT_Neck.assumeskinPose()
)

All you need to do is to set skin pose for every Controller in the Scene. It work pretty good but it will break if someone reset the skin Pose. Let me know if this is helpful for you guys.

joconnell
03-17-2006, 10:24 PM
only problem with the script you wrote is that it's dependant on obejcts in the scene having the two exact object names that you've written i.e. CNT_Head and CNT_Neck - if people don't have these objects in the scene you won't get a correct result. To make something generic you could write a script that does this for every selected object like:

button resetHead "Head"

on resetHead Pressed do
(

for i in selection do
(
i.assumeskinpose()
)

)

Which will loop through each obejct in the selection and reset its pose assuming they have one. Ideally you should include error checking to in case the objects don't have a skin pose set. This is also already in the default ui - if you alt and right click where you set your skin pose from (bottom left quad in my case) there's a button above called assume skin pose which will do this.

Illusion-shadow
03-18-2006, 03:36 AM
Thanks, I will give that a try. What I have right now set up is for the animator at my studio. It's not the best thing in the world, but it work for now. I am still trying to understand Max script, or scripting at all. I created button on the custom attributes so the animator can just click one button and reset the position and rotation for the whole limb, or part of the body. They clam it saves them more time to have a reset button instead of going from each part of the body and reset them. Anyway, thanks!

Aearon
03-19-2006, 08:50 AM
i think the most robust way is to have a list of all your control objects on a custom attribute.

to make this comfortable and fast you will need to write some tools though (these can be kept very basic though)

i'd put a #maxobjecttab parameter on the custom attribute and put all the control objects in there.

attributes animRoot_CA
(
parameters animRoot rollout:animRoot_rlt
(
theCtrls type:#maxObjectTab tabSizeVariable:true
)

rollout animRoot_rlt "Animation Root"
(
fn collectCtrls =
(
theCtrls = for o in selection collect nodeTransformMonitor node:o forwardTransformChangeMsgs:false
)

fn getCtrls =
(
for n in theCtrls collect n.node
)
)

here's a stripped down & clarified version of what i use

CGTalk Moderation
03-19-2006, 08:50 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.