shortcut assignments

 From:  Michael Gibson
3808.2 In reply to 3808.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