Hello everyone, Mostly for educational purposes I'm trying to create a simple rotate tool UI window. But I feel I'm stuck on the Mel syntax and various things I tried just don't work. -I'm using a switch case statement, but I'm wondering if I can omit this by directly inserting the axis into the rotate mel command…
Thanks a lot for the help! It seems I mainly had to learn how to properly combine the strings to be used in the arguments. I'm trying to extend the script further, with adjustable pivot points. However, with the script below i get the following error when choosing the 'origin' option and i don't understand why: // Error:…
Ah I see, thanks! I haven't found a way to keep just a single rotate command in the script, so I made a rotate command for each case as you suggested: <br>global proc RotateSelected(string $way){<br> <br> $pivot = `get_radio_state("pivotCollection")`; <br> $axis = ("-"+(`get_radio_state("axisCollection")`));<br> $degrees =…
It doesn't work cause you can't use "-pivot 0 0 0" as a string. You have to use floats or int for "0 0 0". It's a bit tricky cause you will need those floats only in origin mode. Maybe you will have to make specific rotate commands for each case.
To make "+" and "-" work, you can do like that: global proc RotateSelected(string $way){<br> <br> rotate -r ("-"+(`get_radio_state("axisCollection")`)) (($way)+`get_radio_state("degreesCollection")`);<br> } <br><br>global proc string get_radio_state(string $radio)<br> {<br> string $selected = `radioCollection -q -select…