Notifications
Clear all

[Closed] assumeskinpose() question

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

9 Replies

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 ?

$.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

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?

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 nYourRigsRootNode

which will recursivly process all the child nodes of the specified root node, but this will require that all the nodes are parented together

Shane

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

on what type of node are you getting an error??

Shane

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

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?

Oddly, for shapes, I have no problems…even editable splines…

As for speed…best turn of viewport redraw for starters

Shane