I just thought I'd share my version of the Nudge script with the community here.
I took a look at the nudge scripts that others have created over the years and found a lot of smart ideas, but nothing that combined them all... so I "borrowed" the code from those scripts and cobbled together Nimble Nudge. Also, Michael was integral to fixing a bug in this script. THANKS, MAN!
Just copy the _NimbleNudge.js script file into the "commands" folder in the MoI installation. The following is located in the _NimbleNudge.js file itself and describes all you need to know...
/*
- version: 1.0 (march 15, 2023)
- nimble nudge allows you to easily move selected objects and editing points by using the arrow keys aligned to the view you're in
- in 2d view (top/bottom, left/right, front/back) : up, down, left, right will move the selected objects according to your screen view
- in 3d view (3d/split): up/down is the y-axis, left/right is the x-axis and raise/lower (pgup/pgdn keys) is the z-axis
- (!) raising and lowering only works in the 3d/split view
- all movement also works with the current active c-plane in the same manner
- optionally, modifier keys can be used : "ctrl+up" will move by a small amount, "up" will move by a normal amount and "shift+up" will move by a large amount
- the three distance values are configured below with SMALL_DISTANCE, NORMAL_DISTANCE and LARGE_DISTANCE
- (!) distance values must be a valid number
- suggested distances for working in "mm" : 0.01 / 0.1 / 1.0, "inches" : 0.015625 / 0.125 / 1.0, "feet" (still use inches in moi) : 0.125 / 1.0 / 12.0
- to quickly configure this script, copy the block of text below and paste it in the "moi.ini" file under the "[Shortcut Keys]" header
- (!) check for conflicting shortcut keys
- optionally, you can configure the shortcut keys (one at a time) within in the moi "options" window
RightArrow=_NimbleNudge Right
Ctrl+RightArrow=_NimbleNudge Right Small
Shift+RightArrow=_NimbleNudge Right Large
LeftArrow=_NimbleNudge Left
Ctrl+LeftArrow=_NimbleNudge Left Small
Shift+LeftArrow=_NimbleNudge Left Large
UpArrow=_NimbleNudge Up
Ctrl+UpArrow=_NimbleNudge Up Small
Shift+UpArrow=_NimbleNudge Up Large
DownArrow=_NimbleNudge Down
Ctrl+DownArrow=_NimbleNudge Down Small
Shift+DownArrow=_NimbleNudge Down Large
PageUp=_NimbleNudge Raise
Ctrl+PageUp=_NimbleNudge Raise Small
Shift+PageUp=_NimbleNudge Raise Large
Ctrl+PageDown=_NimbleNudge Lower Small
PageDown=_NimbleNudge Lower
Shift+PageDown=_NimbleNudge Lower Large
*/
/* ----------------( distance configuration )----------------- */
const SMALL_DISTANCE = 0.01; // small amount (ctrl key)
const NORMAL_DISTANCE = 0.1; // normal amount
const LARGE_DISTANCE = 1.0; // large amount (shift key)
/* ----------------------------------------------------------- */
Note: Future updates will be reflected in this post.
Use and modify this script any way you like. Enjoy!
-- Cody
|