Keyboard shortcuts to control rotation

Hello!

How can i add keyboard shortcut to a rotation axis?

Comments

  • Richard HaseltineRichard Haseltine Posts: 101,043

    What do you mean - to have a key press that will add a set number of degrees to the rotation of a selected bone? That isn't directly supported, though ti would be simple to script and the script could then be turned into a custom action and given a shortcut.

  • Something like that. Constantly looking to the side where the sliders are is very tiring.

  • Richard Haseltine said:

    What do you mean

    - to have a key press that will add a set number of degrees to the rotation of a selected bone? That isn't directly supported, though ti would be simple to script and the script could then be turned into a custom action and given a shortcut.

    So where can i find some information about the scirpt you mentioned?

  • Richard HaseltineRichard Haseltine Posts: 101,043

    I said it would be easy to script, not that it already had been (though I think the question has been asked before).

  • Richard HaseltineRichard Haseltine Posts: 101,043
    edited May 2023

    For example, this will do a 5 degree X Rotation. Make copies and chnage the letter, sign, or value as required.

    // Rotate X axis by 5 degrees

    //get the primary seelction, could be expanded to handle all selected nodes
    var item = Scene.getPrimarySelection();

    // Assuming we found an item rotate it
    if ( item ) {
        // get the cotnroller for the X rotation - change to Y or Z as desired
        var controller = item.getXRotControl();
        // If we have the cotrnoller increase its value
        if ( controller ){
            // get the current value
            var curRot = controller.getValue();
            // set the value to current + 5, chnage value or sign as needed for other scripts
            controller = controller.setValue( curRot + 5 );
        }
    }

    You can paste the code into the Daz Studio ScriptIDE pane, then save from there and use Save As to make additional scripts for rotation in the other direction or about different axes.

    Post edited by Richard Haseltine on
  • Thank you! I'll give it a try.

  • Thank you for the script. It's almost perfect right now, I only have one problem left. I can control everything now except the twisting. Can you tell me how i need to modify your script to control twisting (like upper arm twist)?

  • Richard HaseltineRichard Haseltine Posts: 101,043

    It may be being thrown as, in recent versions of Genesis, the twist and bend are split between two bones but clone properties are used to make the active controls available on both bones - so if you have the bend bone selected the real twist control is hidden (and locked, I would think) while the visible "Twist" control is actually a pointer to the twist on the twist bone. Working around that, other than by seelcting the other bone, would be much more complex and I suspect would be figure-specific.

  • I see. Thank you, for your qucik reply.

Sign In or Register to comment.