[Script] Toggle Rotation Limits

Hello everyone!  After some Google-Fu, I didnt' see anything that did this and I was tired of having two buttons on my Streamdeck, so I clugged something together.

When the script is run it goes through the selected bones and flips the Obey Limits setting for the rotations.  "On" becomes "Off"; "Off" becomes "On".

If one of the three rotations is different, it leaves that one alone and only flips the othe three.  The reason I went this route is to avoid ever having one rotation out of sync with the other two.  That happens sometimes when I go into the Property Options.

It treats every selected bone seperately, so it's possible some nodes have their limits turned on while others have them turned off.  It does not check child bones unless you select them.

A few notes that took me while ot figure out in case you look at the script itself (which I recommend!):

  • The print() functions are for debugging and can be removed, though it won't really save you any time.  I saw about a 100ms improvement going through an entire Genesis 9 character.
  • Clamp is the standard 3D phrase for Limit, so isClamped and setIsClamped mean "is it limited" and "set the value for is it limited"
  • If anyone knows how to get a value out of this to change a toolbar button, that'd be awesome!
  • It doesn't have a cool icon.
  • For safety/security, it's saved as a plain text script so you can check it out before running.

If this is helpful, or if you find a bug or faster way, please let me know!

Comments

  • ElorElor Posts: 3,157
    edited July 21

    One pose went too far, but I try to find a way to show the purpose of the script laugh

    The archive will have a 91x91 .png file which will act as the icon showed by Daz and a 512x512 .tip.png which will be used when the mouse cursor hover over the icon (I packaged them into an archive to avoid the forum mangling their respective name).

    I named both 'Toggle Rotation Locks' but if someone used a different name for the script itself, they will have to rename the pictures using the same name as the one used for the script.

    Thank you for your script !

    zip
    zip
    Toggle Rotation Locks Icons.zip
    93K
    Toggle Rotation Locks.tip.png
    512 x 512 - 102K
    Post edited by Elor on
  • bshugs1525871bshugs1525871 Posts: 183

    Elor said:

    The archive will have a 91x91 .png file which will act as the icon showed by Daz and a 512x512 .tip.png which will be used when the mouse cursor hover over the icon (I packaged them into an archive to avoid the forum mangling their respective name).

    I named both 'Toggle Rotation Locks' but if someone used a different name for the script itself, they will have to rename the pictures using the same name as the one used for the script.

    Thank you for your script !

    Thanks for the awesome icon!  I couldn't think of a cool way to illustrate the idea and you hit it!

Sign In or Register to comment.