View Full Version : assumeskinpose() question
arturro 03-01-2008, 11:54 PM hello,
can you please help me witm my problem... I want to add a reset button to the rigg's root (to the attribute holder) that would assume a skin pose of my rigg? is something like this appliable, or bettter assign a key shourtcut to the assume skin pose option?
thanks in advance
|
|
arturro
03-02-2008, 10:05 PM
OK, I learned how to edit and cope with custom attributes through maxScript. But still have no idea how to make the function .assumeskinepose() reset my rigg... Any ideas ?
RustyKnight
03-02-2008, 10:55 PM
$.skinpose.assumeSkinPose()
$.skinpose.setSkinPose()
Well, that was eaiser then I thought...
Check out Interface: SkinPose for more details.
How you walk your rig will depend on how you have set it up.
Shane
arturro
03-02-2008, 11:31 PM
Thanks for reply, this in fact is easy, but It doesn't resets full rigg, and it's connected to rigg root. It only sets my rig in the skin position [0,0,0], rest of the controls are not changed.
Should I make a loop to go through all bones / controls? how can I do it ?
How can I select full hierarchy? I found in reference something about trees, but no success yet :) studying...
my first idea was:
for i = 1 to $.Nodes.Count do
(
$.Nodes[i].assumeSkinPose()
)
but not working :)
I tried also to take something out of assume scin pose macro script as well, but not working still, probably some stupid mistake... any ideas?
RustyKnight
03-03-2008, 01:29 AM
There are any number of ways to do it depending on how your rig is setup. You could use
fn processChildren nParent = (
local lstChildren = nParent.children
for nChild in lstChildren do (
nChild.skinpose.setSkinPose()
processChildren nChild
)
)
processChildren nYourRigsRootNodewhich will recursivly process all the child nodes of the specified root node, but this will require that all the nodes are parented together
Shane
arturro
03-03-2008, 01:49 AM
Thank you for your interest!
recurency can solve it for sure, but I'm getting error that children is undefined, nodes are parented... double clicking root node selects everything that should be reset
RustyKnight
03-03-2008, 03:41 AM
on what type of node are you getting an error??
Shane
arturro
03-03-2008, 08:56 AM
Shapes I think (I may wrong interprate stuff as I'm starting my journey:) )
I have a shape as my rig_root, or other controls (shapes + helpers) are parented to it in a "standard" rig system. Bones are driven by controls only.
I have a custom attributes modifier on this root shape. There I have some morph sliders (breathing, etc), and would like to have a reset rig button. Now to assume a skin pose of my rig I have to double click on the rig root to select controls and go to animation->character->assumeskin pose, if I do it with only my root selected, only main control is reset (so rig's position comes back to [0,0,0])
This also happens when buttons' pressed action is $.skinpose.assumeSkinPose()
I tried to use soem actions from character macroscript and assmeskinpose() action but it doesn't select all hierarchy as well
Thanks for your help
arturro
03-03-2008, 11:07 PM
I tried something clever... I recorded a macro and made a script. worked well, but when I double click on a rig root and select everything, macro records only root selection, rest is not selected. I went further, selected "select similar" and it worked the same, macro recorded only this one control. Going through all controls is a solution, but rather not best... besides reset process (running recorder script) takes a noticeable moment in such case.
Any other ideas?
RustyKnight
03-04-2008, 03:51 AM
Oddly, for shapes, I have no problems...even editable splines...
As for speed...best turn of viewport redraw for starters
Shane
CGTalk Moderation
03-04-2008, 03:51 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.