MoI discussion forum
MoI discussion forum

Full Version: Move / Scale / Bounding Box Center

Show messages: All  1-3  4-9

From: Frenchy Pilou (PILOU)
20 Feb 2018   [#4] In reply to [#3]
More tricky second level than my basic try! :)
From: TOM (SIRTOM)
21 Feb 2018   [#5] In reply to [#4]
Thank you both Pilou and Michael !
From: surferdude
1 Apr 2020   [#6] In reply to [#3]
Hi Michael, is it possible to extend this command? I would like to use one shortcut instead of two. For example, If I click a hotkey it will trigger the bounding box center, the next click will make it a normal move/scale/ command. So you can choose between these commands while using only one shortcut.
From: Michael Gibson
1 Apr 2020   [#7] In reply to [#6]
Hi surferdude,

re:
> For example, If I click a hotkey it will trigger the bounding box center, the next click will make it a
> normal move/scale/ command. So you can choose between these commands while using only one shortcut.

Yes, in v4 it's possible to set up a shortcut key that will do that. Here is what you would put for the command part of the shortcut keys:

script: /* Scale, switch between center and regular */ var didcenter = false; try { didcenter = moi.command.getOption( 'scale_center' ); } catch(e){} if ( didcenter ) { moi.command.execCommand( 'Scale' ); } else { moi.command.execCommand( 'Scale BoundingBoxCenter' ); } moi.command.setOption( 'scale_center', !didcenter );

script: /* Move, switch between center and regular */ var didcenter = false; try { didcenter = moi.command.getOption( 'move_center' ); } catch(e){} if ( didcenter ) { moi.command.execCommand( 'Move' ); } else { moi.command.execCommand( 'Move BoundingBoxCenter' ); } moi.command.setOption( 'move_center', !didcenter );

- Michael
From: surferdude
1 Apr 2020   [#8] In reply to [#7]
Amazing!

Thank you a lot! It will make my work way easier!

Patiently waiting for the final release of v4!
From: raytownmike (HOPPER)
3 Apr 2020   [#9] In reply to [#8]
Nice!

Show messages: All  1-3  4-9