How can I set a shortcut to Rotate X +- , Translate Y+- etc

KGKG Posts: 0
edited December 1969 in The Commons

I tried (unsuccesfully) to find a way to set a shortcut for

Rotation X+
Rotation X-
Rotation Y+
Rotation Y-
etc...

Is there a way to do that? I think the closest is the Parameters pane Bend/Twist/Side-Side, but couldnt find a way to set a hotkey

If not , perhaps a good samaritan that could create a Script for it?


Thanks!

Comments

  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    The parameters tab also houses the rotation for a given object under "Transforms". If it's not visible, try selecting '"Show Hidden Properties" in the options box at the very top of the pane.

  • BlackFeather1973BlackFeather1973 Posts: 739
    edited December 1969

    The Bend/Twist/Side-Side sliders in the parameters tabe are the x, y and z rotations. They're just renamed.
    I'm not sure what you mean by 'setting a shortcut' for them. You can step through the rotations by clicking the minus and plus signs next to the sliders, each click will standard give you a 0.5 degree rotation. In the parameters settings of the slider, you can change the step value by setting the nudge property to your preferred value.

  • Richard HaseltineRichard Haseltine Posts: 102,759
    edited December 1969

    You would need to create a custom action, using script like

    var nodes = Scene.getSelectedNodeList();
    var val;
    for ( var n = 0 ; n < nodes.length ; n++ ) {
         val = nodes[ n ].getXRotControl().getValue();
         nodes[ n ].getXRotControl().setValue( val + yourincrementhere );
    }

    with the appropriate step inserted. You could then assign a keyboard shortcut to the each action.

  • KGKG Posts: 0
    edited December 1969

    Thank you Richard!

    I will try to create the script, but it looks exactly what I looking for


    Hi BlackFeather1973

    What I want is to skip the use of the mouse as much as possible and use keys instead , for example, to press the "U" key to rotate X+ , "I" key to Rotate X- and so on,
    I have the theory that would help to pose faster

  • KGKG Posts: 0
    edited December 1969

    Hi

    I have been trying find a way to switch Rotation using Local Coordinates, and Object coordinates

    getXRotControl() seems to work with Local Coords only, is there a way to switch betweeen this coordinates modes thu scripting ?

    Thank you

  • BlackFeather1973BlackFeather1973 Posts: 739
    edited January 2013

    I think getWSRot() and setWSRot() let you read and write rotations in world space coordinates.
    Not sure how one would do that exactly, but you can look them up in the DS3 script documentation, you can download that here : http://docs.daz3d.com/doku.php/public/software/dazstudio/3/start

    Post edited by BlackFeather1973 on
  • macleanmaclean Posts: 2,438
    edited December 1969

    If you follow Richard's suggestion and make scripts, you can then turn them into Custom Actions and assign keyboard shortcuts to them.

    Place the script in a content folder, right-click it and choose Create custom Action.
    Now press F3 for the Customise dialog, expand Custom Actions in the left-hand pane. Right-click your action and select change Keyboard Shortcut.

    mac

  • bshugs@hotmail.combshugs@hotmail.com Posts: 176
    edited December 1969

    maclean said:
    If you follow Richard's suggestion and make scripts, you can then turn them into Custom Actions and assign keyboard shortcuts to them.

    Place the script in a content folder, right-click it and choose Create custom Action.
    Now press F3 for the Customise dialog, expand Custom Actions in the left-hand pane. Right-click your action and select change Keyboard Shortcut.

    mac

    If anyone doesn't want to go to the trouble of making the scripts, I posted a collection on ShareCG-Rotation Scripts. Wish there was some way to automate the Custom Action and Key Binding steps. Would save a lot of time. Thought about looking at a plug-in, but my programming skills are way out of date, and in the end it would just end up a low-brow PowerPose.

    Of course I referred back to this forum and mentioned Mr. Hasteltine.

  • RuphussRuphuss Posts: 2,631
    edited December 1969

    maclean said:
    If you follow Richard's suggestion and make scripts, you can then turn them into Custom Actions and assign keyboard shortcuts to them.

    Place the script in a content folder, right-click it and choose Create custom Action.
    Now press F3 for the Customise dialog, expand Custom Actions in the left-hand pane. Right-click your action and select change Keyboard Shortcut.

    mac

    If anyone doesn't want to go to the trouble of making the scripts, I posted a collection on ShareCG-Rotation Scripts. Wish there was some way to automate the Custom Action and Key Binding steps. Would save a lot of time. Thought about looking at a plug-in, but my programming skills are way out of date, and in the end it would just end up a low-brow PowerPose.

    Of course I referred back to this forum and mentioned Mr. Hasteltine.

    thank you very much
    that helps a lot for people who like to use their keyboard
    if you think the rotation is to slow you can change the nudge setting of a whole figure at once
    by selecting all nodes you want to change in the options menu under parameters
    it is normally set to 0.50
    now please this for translation also would be very nice

  • bshugs@hotmail.combshugs@hotmail.com Posts: 176
    edited December 1969

    thank you very much
    that helps a lot for people who like to use their keyboard
    if you think the rotation is to slow you can change the nudge setting of a whole figure at once
    by selecting all nodes you want to change in the options menu under parameters
    it is normally set to 0.50

    First off, glad you like it. Wasn't sure if there was much use for it.

    I set the increment of the change to the nudge value of the parameter, instead of a fixed value, so it would work across as many objects as possible. You could also change the script by replacing line 10 with, for example:

     nIncrement = 2
    or
     nIncrement = oNodes[ i ].getXRotControl().getSensitivity() * 5;

    The first would make the nudge equal to 2 each time. The second to five times the standard nudge, maybe a Big Nudge macro?

    now please this for translation also would be very nice


    After poking around the scripting manual I found that you can replace the word getXRotControl with getXPosControl (this word appears three times in each script). Just make sure you change the file names. This will change the position, but it only works for root nodes such as the Genesis 2 Male node or the Hip node. If you try it on the Right Hand or Left Big Toe or any other child node, it does nothing.

    I haven't figured out how to simulate the effect of dragging a child node with the universal tool yet. It may not be possible with the scripting engine.

    If you think those scripts would be handy for you, but aren't comfortable editing the originals, let me know and I'll try to kludge them together and get them onto ShareCG as soon as practicable.

  • RuphussRuphuss Posts: 2,631
    edited December 1969

    thank you Shawn

    I never wrote any scripts so I would very appreciate it if you would

    @Mr and Mrs Daz:

    please a keybinding for rotation and translation cannot be so hard to be implemented into the studio software

  • bshugs@hotmail.combshugs@hotmail.com Posts: 176
    edited December 1969

    Okay, ruphuss, the scripts have been uploaded to ShareCG! Hope they're helpful to you. They won't work for nudging fingers, but they will move entire characters around, and can be used for sliding out drawer on furniture and such. The file is here : Translation Scipts on ShareCG

    If anyone knows a way to simulate the effect of dragging a rigged limb, such as a hand, with the Daz Scripting engine, I'd love to hear about it.

    please a keybinding for rotation and translation cannot be so hard to be implemented into the studio software

    As for distributing a keybinding, the problem is that Daz Studio stores that stuff (at least on Windows) in a hidden folder for application data. It would be tricky to distribute something would change that file without raising security issues. Also, having looked at the file, there's some technical stuff that I don't understand.
    Finally, if anyone finds my stuff useful, feel free to leave a thanks, or give me a star or two. It makes me feel all warm and fuzzy inside. :)
  • RuphussRuphuss Posts: 2,631
    edited December 1969

    thank you very much again Shawn
    downloaded already

Sign In or Register to comment.