MoI discussion forum
MoI discussion forum

Full Version: shortcut assignments

Show messages:  1  2-21  22-26

From: Michael Gibson
11 Oct 2010   [#2] In reply to [#1]
Hi Snead, for the shortcuts part - those scripts you're using currently work the same as clicking on one of the view tab buttons, it will just activate that tab and not switch it between the 2 different views that can be on the tab.

Here are some scripts that should do what you want - these ones combine activating that tab and also switching the view inside the tab as well:


Set Top View:
script:var vname = 'Top'; var vp = moi.ui.mainWindow.viewpanel; vp.mode = vname; if ( vp.getViewport(vname).name != vname ) vp.reverseView( vname );


Set Bottom View:
script:var vname = 'Bottom'; var vp = moi.ui.mainWindow.viewpanel; vp.mode = vname; if ( vp.getViewport(vname).name != vname ) vp.reverseView( vname );


Set Front View:
script:var vname = 'Front'; var vp = moi.ui.mainWindow.viewpanel; vp.mode = vname; if ( vp.getViewport(vname).name != vname ) vp.reverseView( vname );


Set Back View:
script:var vname = 'Back'; var vp = moi.ui.mainWindow.viewpanel; vp.mode = vname; if ( vp.getViewport(vname).name != vname ) vp.reverseView( vname );


Set Right View:
script:var vname = 'Right'; var vp = moi.ui.mainWindow.viewpanel; vp.mode = vname; if ( vp.getViewport(vname).name != vname ) vp.reverseView( vname );


Set Left View:
script:var vname = 'Left'; var vp = moi.ui.mainWindow.viewpanel; vp.mode = vname; if ( vp.getViewport(vname).name != vname ) vp.reverseView( vname );


Set Split View:
script:moi.ui.mainWindow.viewpanel.mode = 'Split';


Set 3D View:
script:moi.ui.mainWindow.viewpanel.mode = '3D';



Please let me know if those still don't do what you need.



For numpad* I'll need to dig into that a bit, but it is likely a side effect from them being the same actual key on the regular keyboard like you thought.

When shortcuts are loaded from the .ini file, they go through a "canonicalization" process so that they are in one regular structure - (like with a standard order for Alt+Ctrl, etc, in case you wrote a different order of those things directly in the .ini file) and probably it's getting switched there since it thinks that there is just a single key for 8 and *, just like things like z will become Z.

I think that the solution for that will probably be to have a special identifier in v3 you could put in for the numpad keys, so you could make a shortcut that was triggered only by a numpad key and not also tied in to the regular keyboard key at the same time, right now it doesn't understand the numpad as a separate set of keys.

- Michael
From: Michael Gibson
11 Oct 2010   [#3] In reply to [#1]
Hi Snead, I've got the numpad issue tuned up for MoI v3. In MoI v3 you'll be able to
set up a shortcut key that is triggered only by the numpad and not by the same character on the main keyboard.

This will be done by adding in the word Numpad before the key label in the shortcut key editor, like: Numpad3 or Numpad*

- Michael
From: snead
12 Oct 2010   [#4] In reply to [#3]
Thank you, Michael. These shortcuts work beautifully.

These and other shortcuts allow me to put all my views on the numpad in a pattern
that allows me to select them almost without thinking. I use Moi along side a couple of other
softwares. Having a shortcut pattern that is consistent between them is invaluable.

I know you get bombarded with lots of requests from users with individual requests and suggestions.
Your response to mine was unexpectedly fast and most appreciated.

I will try not to pester you too much.

Snead
From: rich (RICHKEAR)
21 Feb 2012   [#5] In reply to [#4]
Michael,

I have used the shortcuts that you listed above and assigned to Numpad keys in V2. They have worked perfectly.
Now that I downloaded the V3 beta, they do not work in the V3 beta. They still work in V2.

Is it possible to solve this?

Rich
From: rich (RICHKEAR)
21 Feb 2012   [#6] In reply to [#5]
Michael,

I just reread your original post, and noticed what I should have noticed before, ie. include Numpad in the script.

It works fine now.

Thanks for this.

Rich
From: Michael Gibson
21 Feb 2012   [#7] In reply to [#6]
Hi Rich, yeah that's a new feature in v3 that you can assign shortcuts to the numpad separately from the main keyboard number keys. So there are these new key names you can use for that:

  Numpad0  Numpad1  Numpad2   ...   Numpad9
  Numpad*  Numpad+  Numpad,   Numpad-  Numpad.  Numpad/

However, there is one bug with it - v2 does not understand these key names and if you launch v2 and it reads the same moi.ini file as v3, it will read in all the keyboard shortcuts but will throw out these numpad ones which it does not understand. And then when it shuts down it will write the keyboard shortcuts back out again so if you open up v2 at some point it will have a side effect that you will lose these numpad key shortcuts.

I'm going to fix that up at some point here so that v3 will use a separate section of the moi.ini file to store these shortcuts that v2 does not understand but until then you may want to make a backup of your moi.ini file so that you can easily restore it if you happen to run v2 and it wipes out your numpad shortcuts. You can find where the moi.ini file is by going to Options > General and push the "Edit .ini file" button - the dialog that pops up has the location of the moi.ini file displayed.

- Michael
From: Rich_Art
21 Feb 2012   [#8] In reply to [#7]
That is cool, I have a numpad on my laptop...

Peace,
Rich_Art. ;-)
From: Metin Seven (SEVENSHEAVEN)
9 Dec 2013   [#9]
Hey, cool, those separate numpad keyboard shortcuts will make a Blender user's life easier in MoI, thanks!

In case you're a Blender user, like me, you might want to check out this thread with Blender keyboard shortcuts for MoI:
http://moi3d.com/forum/messages.php?webtag=MOI&msg=6347.1
From: Duarte Ramos (DUARTEFRAMOS)
21 Jan 2015   [#10] In reply to [#2]
Hey guys, it's been a while.
So I came back to moi after a long period of inactivity (I've been modeling in Blender the most lately), to make my actual first commercial 3D model in MoI

I was setting up my V3 non beta last night and I was trying these scripts, and although they do set the view right, the toggle part of the script doesn't seem to be working anymore.
If I understand correctly these are supposed to reverse the view (from top>bottom, left>right etc.) right? Did I do something wrong or did anything change that broke the toggling part of the script?
From: Michael Gibson
21 Jan 2015   [#11] In reply to [#10]
Hi Duarte, welcome back!

> If I understand correctly these are supposed to reverse the view (from top>bottom, left>right etc.)
> right? Did I do something wrong or did anything change that broke the toggling part of the script?

Actually these scripts from the above post (http://moi3d.com/forum/index.php?webtag=MOI&msg=3808.2) are meant to just go to one specific view so you can set a specific key to go always immediately to the Back view for example, without needing to do any toggle.

Here are some that will work with a toggle type action, these will set the view to maximized or if already maximized it will toggle it.


Set maximized Top view or toggle Top/Bottom:
script:var vname = 'top'; var vp = moi.ui.mainWindow.viewpanel; if ( vp.mode == vname ) vp.reverseView( vname ); else vp.mode = vname;

Set maximized Front view or toggle Front/Back:
script:var vname = 'front'; var vp = moi.ui.mainWindow.viewpanel; if ( vp.mode == vname ) vp.reverseView( vname ); else vp.mode = vname;

Set maximized Right view or toggle Right/Left:
script:var vname = 'right'; var vp = moi.ui.mainWindow.viewpanel; if ( vp.mode == vname ) vp.reverseView( vname ); else vp.mode = vname;


- Michael
From: Duarte Ramos (DUARTEFRAMOS)
21 Jan 2015   [#12] In reply to [#11]
Oh sorry for the misunderstanding, I was under the impression it was supposed to toggle.
Anyway thanks a lot for those new scripts, they come really in handy. The toggling function really helps a lot, with that option I can really free up a lot of hot keys for other functions,

Many thanks!
From: krass
11 Jun   [#13]
Friends, hello!
I want to bother you with such a question.

I have a device, quite popular among artists and designers (and it is really very convenient to work with) - TourBox -
with customizable buttons and various knobs, to which you can bind custom hotkeys from almost any program.

I would like to understand - is it possible to bind hotkeys (not in the form of scripts) to this device?
For example, closer-farther, object rotation, change of projection types, various tools?
Perhaps someone has encountered this - I will be grateful for any advice or help.

The device itself (and a description of how to interact with it) is presented on the website
www.tourboxtech.com
From: Frenchy Pilou (PILOU)
11 Jun   [#14] In reply to [#13]
As Moi can work with the space Navigator I suppose that will be possible! :)
Wait the answer of Michael !;)


From: krass
11 Jun   [#15] In reply to [#14]
Thank you for your answer!
I also hope that something like this can be done - I just don't know how ))))
From: Michael Gibson
11 Jun   [#16] In reply to [#13]
Hi krass, it looks like they have instructions here for how to set it up:

https://www.tourboxtech.com/en/manual/how-to-customize-buttons/

You would set up a shortcut key in MOI and then have the device trigger that shortcut key.

- Michael
From: krass
11 Jun   [#17] In reply to [#16]
Mike, yhanks for answer!

Yes, I have carefully studied these instructions and I have figured out how to assign hotkeys in other applications.
The problem is that MOI3D has a slightly different principle (or I don't understand something) - I can't bind switching projection windows (for example) to some keyboard combination - this or that script is required (which are described at the very beginning of the topic).

And how to implement this - I don't quite understand here (((
From: Michael Gibson
11 Jun   [#18] In reply to [#17]
Hi krass,

re:
> I can't bind switching projection windows (for example) to some keyboard combination - this or
> that script is required (which are described at the very beginning of the topic).

Do you mean you want a shortcut key for the Options dialog > View > "3D view projection" setting?

Go to Options > Shortcut keys and put in this for the "Command" part:

script: var vp = moi.ui.mainWindow.viewpanel.getViewport('3D'); if ( vp.projection == 'Perspective' ) { vp.projection = 'Parallel'; } else { vp.projection = 'Perspective'; }

When the shortcut is triggered it will switch the 3D viewport between parallel or perspective projection modes.


There are some of the most commonly used scripts listed here:
https://moi3d.com/4.0/docs/moi_command_reference11.htm#shortcutkeys
like Hide, Lock, reset all views, select all, deselect all, invert selection, go to split view, maximize 3d/top/front/right view, isolate selection, select all curves, turn grid snap on/off, and some more.

Also there are more here:
https://moi3d.com/download/scripts/PetrsMoiPage/PetrsMoiPage.htm

If you want something that isn't listed just post what you want here and I can tell you the script code to do that.

- Michael
From: krass
11 Jun   [#19] In reply to [#18]
Apparently I wasn't understood correctly by you.

I wrote that the controller system understands only keyboard shortcuts (and mouse clicks) to program the device.

For example, Alt + F1 (Cntrl + G) and so on.
But not the format of the script type moi (script: var vp = moi.ui.mainWindow.viewpanel.getViewport('3D'); if ( vp.projection == 'Perspective' ) { vp.projection = 'Parallel'; } else { vp.projection = 'Perspective'; })
From: Frenchy Pilou (PILOU)
11 Jun   [#20] In reply to [#19]
Input just the Moi's short Cut for example "Ctrl + G" defined for a script inside the Moi Options Menu... to a button of TourBox ?
From: krass
11 Jun   [#21] In reply to [#20]
This is an interesting thought, thank you, I will try this method!!

Show messages:  1  2-21  22-26