PDA

View Full Version : Maya style navigation in Lw is possible



oDDity
09-11-2006, 05:03 AM
I think this deserves more advertising.
If you've ever wanted alt + LMB. MMB and RMB for rotate, pan and zoom, just like maya, xsi, and many other apps, then all you need to do it download this little app http://www.autohotkey.com
Then make a txt file with this script (written by evenflcw) in it:

#SingleInstance force
SetTitleMatchMode, 2

/*
Lightwave Viewport Navigation - AltPlusMinus!

Alt+LMB - Rotate View (Standard LW combo)
Alt+MMB - Zoom View
Alt+RMB - Pan View
WheelUp - Zoom In
WheelDown - Zoom Out
*/

#IfWinActive LightWave ahk_class WMgrBasic

!RButton:: ;When user presses Alt+MMB,
Send ^!{LButton Down} ;Send 'Ctrl+Alt+LMB pressed'
KeyWait RButton ;Wait until MMB is released
Send ^!{LButton Up} ;Then send 'Ctrl+Alt+LMB released'
return

!MButton::
Send +!{LButton Down}
KeyWait MButton
Send +!{LButton Up}
return

*WheelUp::
Send {.}
return

*WheelDown::
Send {,}
return

#IfWinActive

and save it with an .ahk extension. Just leave it on your desktop or somewhere handy and double click it when needed.

Dodgy
09-11-2006, 05:10 AM
Or drag it into your startup list and use it all the time like I do :) Very useful!

KillMe
09-11-2006, 05:30 AM
nice!! lw shortcut navigation has always sucked - this should improve it alot - thanks


edit: hmmmmmmm it doesn't work - get the scroll wheel zoom but panning doesn't work its yet another zoom - and the middle mouse does nothing - help!!

edit 2: ok got the panning working with a little editing of the script but - middle mouse button i noticed is shifting me between japanese and english keyboard ( i have japanese installed ) - but matters little as i prefer using the mouse wheel for zooming - so all good again - yay

oDDity
09-11-2006, 05:31 AM
Well that's the problem, some people have known about this for a long time, I've wanted it for years and never knew about it.
The conclusion is that it needs more advertising, so I've also posted it at CgTalk and spinquad.

alex-7
09-11-2006, 05:36 AM
wow .. is this somthing of (next generation) scripts.

it works thanks alot oDDity

alex-7
09-11-2006, 05:50 AM
I've changed the Pan shortcut to MMB .. It's better now for me.

oDDity
09-11-2006, 05:54 AM
IIt's already MMb for pan,. I changed the code, but I didn't chage the text explaination at the top of the script.

I was going to say 'great now I can turn off the viewport toolbars'
but I can't see any option in the keyboard shortcut dialogue to set up hotkeys to change between texture/textured wire/wireframe display etc.
What's going on?

UnCommonGrafx
09-11-2006, 06:15 AM
There are none. As well as for the tabs. Maddening, isn't it?

alex-7
09-11-2006, 06:33 AM
aha :) .. that means that I've changed the code to the original one .. I didn't notice that ;D

oDDity
09-11-2006, 06:35 AM
It certainly weird. Version 9 of the software and no one has thought of adding hotkeys for display modes. It's a command that is used constantly.

alex-7
09-11-2006, 06:36 AM
yes that is Maddening .. I change between texture/textured wire/wireframe etc alot and that is something annoying to change them from the veiwport tooldbar

kmaas
09-11-2006, 06:40 AM
Anyone put it in the feature request forum?

Dodgy
09-11-2006, 07:06 AM
You can assign keys to change the display type in modeler, press ctrl-numpad key to assign a particular viewport's attributes to that key. The mouse cursor has to be over the viewport you want to assign when you do that though!

oDDity
09-11-2006, 07:12 AM
You're right, but you have to keep number lock on.
I'm learning alot of hidden things today.

Ztreem
09-11-2006, 08:42 AM
FINALLY! I've been waiting for this a long time. It's kind of strange I've used LW for years and it feels like I never get use to the shortcutkeys, but after a one week class in Studiotools I got used to the alt+left,middle, right mouse button thing. So maybe I'm stupid or maybe the alt+different mousbuttons combination is just a better solution. Thanks for sharing!

tonybliss
09-11-2006, 09:20 AM
Yeah thank you oddity, I never knew about these in LW, tho' i enjoyed using them in maya. My problem now is using my wacom with this, i have disaccustomed myself to using the mouse with ... well everything. I sure do wish there was a scroll button on my pen :D
Thanks again for the heads up!!
Cheers!!!

faulknermano
09-11-2006, 10:39 PM
useful. however, i dont want to put down evenflw's work here, or anyone else's, but in my opinion, "maya-style" naviagation has more to do with how the camera does relative pan perpendicular to its direction than simply shortcuts. personally, i'm ok with shortcuts. my continuing problem with LW navigation (as contrasted by Maya navigation) is 1. difficulty in focusing in on an item on component level and 2. to move the camera and/or item in relation to view of the camera. while "it can be done" in LW, workarounds, such as parenting the item to the camera to gain parent coordinates is not as elegant or smooth or easy as Maya's nav.

oDDity
09-12-2006, 01:56 AM
This is primarily a modeler workflow enhancment I'm talking about here. I spend 99% of my time there. In modeler, this mimics maya navigaiton perfectly.
As for layout's problems, they're beyond what you can do with this autohotkey app.

Dodgy
09-12-2006, 03:11 AM
I abhor the maya navigation method. Not the hotkeys, as I find alt and mouse more intuitive than alt-shift etc, but the actual method of navigating the scene is a pain in the bum compared to LW. If you want to move towards something you have to turn perpendicular to it first? Drives me mental. Okay, modeler does this, but I prefer the way layout does it.

With autokey I have my setup thus:

alt-lmb rotate.
alt-mmb pan (XZ plane in layout)
alt-rmb pan (Y direction in layout)
alt-mousewheel zoom in/out

and it works perfectly for me :)

faulknermano
09-12-2006, 03:29 AM
If you want to move towards something you have to turn perpendicular to it first?

of course not, just zoom in. camera will dolly along the local plane of the camera.

the problem with LW, to make clear, is that SHIFT+ALT+LMB "pans" along Y-plane. assume you have a opengl camera facing 0,0,0. "panning" you'd be moving along XZ. zooming will move along Z. this where i dont like it. by "panning" you move the center of interest along XZ. zooming, however, will not do this. after a while navigating, center of interest is thrown off, and orbitting is off. i would then need to select an item and center on it so orbitting becomes sensible.

but so as not to miss my point, if an opengl cam is facing 0,0,0, both zoom and "pan" will move the view on the same axes. it's a waste. i often just simply want to move the view up and to the side. but i cant do that. i'd have to LMB to move to the side and *then* RMB to move up into place. in Maya, just MMB and drag. imo, very intuitive.

i'd wish that we have a "camera coordinate system" for layout item movement: item rotates relatively along the plane of the camera's local. makes manual tracking easier. :)



In modeler, this mimics maya navigaiton perfectly.

almost perfectly: probably except the "roll" when dragging along the borders of the viewport. i find this behavior desirable, though.

oDDity
09-12-2006, 03:31 AM
No idea what you're on about dodgy. I don't notice any difference between maya and lightwave, now I have the same system.
Not sure how it can be enough to drive you mental, while I don't even notice it.
I constantly use 'center selection' anyway, it's the fastest way to move around. Always have the center of interest at you center of interest. Don't see the problem.

Dodgy
09-12-2006, 07:16 AM
of course not, just zoom in. camera will dolly along the local plane of the camera.

the problem with LW, to make clear, is that SHIFT+ALT+LMB "pans" along Y-plane. assume you have a opengl camera facing 0,0,0. "panning" you'd be moving along XZ. zooming will move along Z. this where i dont like it. by "panning" you move the center of interest along XZ. zooming, however, will not do this. after a while navigating, center of interest is thrown off, and orbitting is off. i would then need to select an item and center on it so orbitting becomes sensible.

but so as not to miss my point, if an opengl cam is facing 0,0,0, both zoom and "pan" will move the view on the same axes. it's a waste. i often just simply want to move the view up and to the side. but i cant do that. i'd have to LMB to move to the side and *then* RMB to move up into place. in Maya, just MMB and drag. imo, very intuitive.

i'd wish that we have a "camera coordinate system" for layout item movement: item rotates relatively along the plane of the camera's local. makes manual tracking easier. :)


Zooming only moves in on the center of interest. If the object you're interested is much beyond that, you have to rotate the camera perpendicular to the direction you want to move, and then drag till it hopefully pops into view. You can use frame selected, but you can do that in LW too. I just find it more awkward than LW's move along the ground then up or down philosophy. Each to their own :)

Odd, there's no difference in modeler and I'm fine with that, but in layout the difference is more useful IMHO.

JGary
09-12-2006, 08:10 AM
Is it possible to define chorded mouse clicks with this app? I would like to define the alternate Maya zoom (alt+LMB+MMB) in Lightwave since this works great with my tablet pen (I can switch between panning and zooming while I have the side MMB pushed on the pen and alternating between pushing the pen tip as I drag). I can only find commands for defining single mouse buttons, but I know very little scripting so...

oDDity
09-12-2006, 01:07 PM
PM evenflcw about it. Or post in the thread I started in the plugins forum, I don't think he reads any but that one.