Adjust Rigging to Shape script?

Is there a way to write a script that will run "Adjust Rigging to Shape" and have so that it selects specific body parts of a custom figure? I know you can set-up scripts in Studio but I've never written one before and don't even know where to start.

Comments

  • RKane_1RKane_1 Posts: 3,039

    Is there a way to write a script that will run "Adjust Rigging to Shape" and have so that it selects specific body parts of a custom figure? I know you can set-up scripts in Studio but I've never written one before and don't even know where to start.

    I apologize. I am afraid I don't understand. Can't you just chec the boxes you want and adjust rigging JUST on those bones anyway? Or are you saying select the bones in the Scene Tab and run only on those selected bones instead of having to check everything on or off?

  • What I'm saying is to have something setup, script wise, to do this automatically without having to select the bones needed each time. The reason I asked is because I have a custom figure that I've finally got to the point where it conforms correctly to whatever morph I dial up. The issue is that when I dial up whatever morph the rigging doesn't adjust (I'm thinking it has something to do with "saving morph assets"). So I do "Adjust rigging to shape" which fixes the rigging problem. And then if I dial the morph out (to "0"), then I have to run ARS again. So it would be nice to have a script for this custom figure that does ARS without having to do the set up each time. Was that a better explanation?

  • Thanks. Tried it and got mixed results. Looks like I'll be doing it the old fashioned way thru the menu.

  • Tramp GraphicsTramp Graphics Posts: 2,421

    OK, now here's a related question regarding adjusting rigging of clothes. Is it possible to adjust the rigging on a clothing item so that, as in the case of pulling a pair of pants or shorts down, the rigging changes depending upon where the clothing is "currently" posed, (such as halfway down the thighs, down to the kneeds, down around the ankles, etc.), or in the case of a shirt, blouse, or strapped top, (strap or collar off the shouler, Top halway down arms, arms out of sleeves, with top scrunched around waist, etc.) I've found that when you morph a clothing item for "partial undressing", the parts still follow their "default" joints instead of where they are currently located. 

  • Richard HaseltineRichard Haseltine Posts: 107,960

    OK, now here's a related question regarding adjusting rigging of clothes. Is it possible to adjust the rigging on a clothing item so that, as in the case of pulling a pair of pants or shorts down, the rigging changes depending upon where the clothing is "currently" posed, (such as halfway down the thighs, down to the kneeds, down around the ankles, etc.), or in the case of a shirt, blouse, or strapped top, (strap or collar off the shouler, Top halway down arms, arms out of sleeves, with top scrunched around waist, etc.) I've found that when you morph a clothing item for "partial undressing", the parts still follow their "default" joints instead of where they are currently located. 

    It's possible to adjust the joint centres, but in a situation like this you'd also need to adjust the weights and that isn't supported.

  • Tramp GraphicsTramp Graphics Posts: 2,421

    OK, now here's a related question regarding adjusting rigging of clothes. Is it possible to adjust the rigging on a clothing item so that, as in the case of pulling a pair of pants or shorts down, the rigging changes depending upon where the clothing is "currently" posed, (such as halfway down the thighs, down to the kneeds, down around the ankles, etc.), or in the case of a shirt, blouse, or strapped top, (strap or collar off the shouler, Top halway down arms, arms out of sleeves, with top scrunched around waist, etc.) I've found that when you morph a clothing item for "partial undressing", the parts still follow their "default" joints instead of where they are currently located. 

    It's possible to adjust the joint centres, but in a situation like this you'd also need to adjust the weights and that isn't supported.

    cryingThat's all I needed to know. Thanks. 

  • CGI3DMCGI3DM Posts: 279

    What I'm saying is to have something setup, script wise, to do this automatically without having to select the bones needed each time. The reason I asked is because I have a custom figure that I've finally got to the point where it conforms correctly to whatever morph I dial up. The issue is that when I dial up whatever morph the rigging doesn't adjust (I'm thinking it has something to do with "saving morph assets"). So I do "Adjust rigging to shape" which fixes the rigging problem. And then if I dial the morph out (to "0"), then I have to run ARS again. So it would be nice to have a script for this custom figure that does ARS without having to do the set up each time. Was that a better explanation?

    As I understand after the ARS, you have to adjust the ERC Freeze for the morph.

  • For the morph, yes, but when you default back to "0", the rigging should revert as well. It's not doing that in my custom figure. I think it has something to do with "saving morph assets" that I did when the figure was having "duplicate formulas" issues. I used a solution I found to fix it. The figure conforms better but I had to delete the rigidity group I had set up so that morph correctives wouldn't distort the mesh.

  • Richard HaseltineRichard Haseltine Posts: 107,960

    If it's a custom figure did you memorise the rigging (not the same as memorising the figure) in its default state? That's a vital step for both adjusting the rigging in the first place and resetting it (assuming you leave the check boxes) after ERC Freeze.

  • I had memorized it at one time. I'll have to check and see if it needs it again after doing the morph assets thing and see if anything got changed.

  • bluejauntebluejaunte Posts: 1,990

    I took the script by Rob the other day and changed it so it will only do it for some bones and face groups. Very annoying that the API only has methods for excluding bones, which means we need to first tediously iterate through everything and then remove from that only what we do want. Anyway, this is for inner squints and head face group, you can find array variables includeFaceGroups on line 143 and includeBones on 191 that you can change to your liking. If you want all face groups, just comment out line 186.

     

    dsa
    dsa
    Adjust Rigging Inner Squints.dsa
    6K
  • I tried your script and made the necessary tweaks to fit my custom figure. Still doesn't work as expected. Apparently I'm not entering the code right. I can do the ARS thru the menu and tick off the items that don't need to be affected and it works fine. I thought I had specified the same bones in the script but causes the figure to fly off the head. Ugh! I may just go back to the version of my figure before the current one and just deal with the issues that one had.

  • bluejauntebluejaunte Posts: 1,990

    I tried your script and made the necessary tweaks to fit my custom figure. Still doesn't work as expected. Apparently I'm not entering the code right. I can do the ARS thru the menu and tick off the items that don't need to be affected and it works fine. I thought I had specified the same bones in the script but causes the figure to fly off the head. Ugh! I may just go back to the version of my figure before the current one and just deal with the issues that one had.

    Are you entering the correct bone names, like lSquintInner not "Left Squint Inner"? Sounds odd in any case. The skeleton flies off or what do you mean?

  • On my custom figure (Antennae), the bone names and the label names are the same. Issue might be the bones I've listed to exclude that are similar to Genesis 8 Male (ie. Abdomen Lower, Abdomen Upper, etc).

  • Yep. It was the bone names for the similar G8M body parts. Changed the names and the script finally works (or at least once).

Sign In or Register to comment.