Keyboard shortcut for redoing last gumball transform?

Hey,

I was just thinking this could be a very nice shortcut to have.

I would like a key bind to redo the last gumball transformation. It should work the same way like a nudge. But with the last used value. In effect it would also be the same as double clicking the red/green/blue arrow.

So for example ctrl+alt+left nudges the object to the left with the value last entered.

Hi Simon,

Based on your suggestion, I’m imagining something like ReplayGumball (or some other hideous named command) that remembers the last used transform (move, rotate, or scale - and amount). When run, it applies that same transform about currently selected object(s) gumball center.

That command could be added to a keyboard shortcut, or alias, or whatever.

Is that what you’re after?

yes it is almost like you said.

Ideally I would like to work it like double clicking the gumball arrow. But instead of double clicking to use a keyboard bind.

image

In this case, the entered value is 1000. So everytime I do the keybind (crt-alt-right_arrow) it moves 1000 to the right. left arrow would move to the left, up to up, down to down,…

Maybe what I am suggesting is not so easy to implement. Not sure, it seemed like a nice idea to me :slight_smile:. I use nudge a lot. But I find that the amount I need to nudge constantly changes

What you want I would make a script or macro for that changes nudge settings, and then make several nudge setting buttons or aliases. This way you can move in any direction with the last set nudge settings, for example:

-_Options
_ModelingAids
_Nudge
_Step 1
_ShiftStep 10
_ControlStep 0.1
_EnterEnd
1 Like

Instead of resetting the Nudge settings every time, one could also set up a series of buttons with the script below. Can use the same script for all the buttons, all that is necessary is to modify the distance and direction numbers to correspond to the desired nudge setting for each button. The script is set up to use the active CPlane directions (not world).

"""Generic script for nudging selected objects a fixed distance and direction.
Directions correspond with active view CPlane compass directions, East is +X axis
Insert arguments at bottom for nudge distance and direction as follows:
direc: 0=East, 1=North, 2=West, 3=South 4=Up 5=Down"""

import rhinoscriptsyntax as rs

def NudgeIncrement(dist,direc):
    objs=rs.SelectedObjects()
    if objs:
        rs.EnableRedraw(False)
        plane=rs.ViewCPlane()
        if direc==0: dir_vec=plane.XAxis*dist
        elif direc==1: dir_vec=plane.YAxis*dist
        elif direc==2: dir_vec=-plane.XAxis*dist
        elif direc==3: dir_vec=-plane.YAxis*dist
        elif direc==4: dir_vec=plane.ZAxis*dist
        elif direc==5: dir_vec=-plane.ZAxis*dist
        rs.MoveObjects(objs,dir_vec)
        
#Add arguments below - (distance, direction)
NudgeIncrement(10.0,0)
2 Likes

might there be a way to insert the last used value into that script?
image
(1000 in this case)