View Full Version : Is maya-stlye navigation possible as a plugin?

09-10-2006, 06:34 AM
i.e. - hold down a hotkey, then use LMB to rotate, MMB to pan and RMB to zoom?
I just want to know if this is possible as a plugin or lscript, and how much work would it involve, or does it need changes to core lightwave code not available to you guys.

09-10-2006, 07:33 AM
afaik there is no straight way to do this in lw

this is also the reason why the 3d spacemouse/ball doesn't work in lw

maybe autohotkey might be able to help you out by remapping certain hotkeys.

it's a usefull program to have anyway.

09-10-2006, 10:27 AM

I put my autohotkey settings in that thread. You should be able to modify them to fit your preferences (if not, don't hesitate to ask for help).

To my knowledge viewport navigation per se isn't available in the sdk (or lscript).

09-11-2006, 03:50 AM
Wow, that's exaclty what I was looking for, I was playing aorund with autohotkey a bit before I read this post, and couldn't come up with anything like this, but this mimics maya navigation perfectly. ( after I swapped MMB to pan and RMB to zoom)
Thanks a LOT, I've wanted something like this for years, it'll speed me up greatly in modeler.
YOu even have it set up to only work with modeler.
This should be advertised somewhere more prominent, I'm sure there are others who love this as well.

09-11-2006, 06:31 AM
Np! I in turn thank whoever first informed me about AutoHotkey (whoever it was). :)

Only works with Modeler? Hmm, that might depend on what LW version you're using. It seems NT changed the names of the windows between LW8.x and LW9.x*, so AutoHotkey might simply have problems identifying the Layout window. I meant to have and I do have the same ahk code working for both Modeler and Layout (and if I remember right, across versions aswell. But I might remember wrong or perhaps I fixed this sometime after the upload to the forum). It's the "#IfWinActive LightWave ahk_class WMgrBasic" line that is supposed to control for what window a hotkeys should be active for. In any case I'll look into it.

*If I remember correctly, for LW9.x Lightwave (aka "Layout") is now officially named LightWave® Layout® instead of just LightWave®, or something to that degree. Which ofcourse is great because most people think of Lightwave as composed of Modeler+"Layout" and NT has sold them under that common epithet for as long as I can remember.

I agree that it would be cool to provide many different *.ahk configs matching other softs. But unless Nt would like to make the thread sticky it will dissappear in no time anyway... or maybe Flay could link it because I imagine most users (experienced anyway) would look there sooner or later for a solution.

09-11-2006, 09:36 AM
Sorry, I should have said 'you've set it up to only work with lightwave'
I don't use layout much, so it's not an issue for me there, but it does work in that as well.
I'd love something like this for zbrush, because the navigation there is even worse than lightwave. THat might not be possible though, since you don't actually hold down a hotkey to rotate, you just LMB in a blank area of the canvas.

09-11-2006, 11:12 AM
No worries.

I don't own ZB and don't care to dl a the demo. But I think your suspision is right. But you could try the Window Spy that comes with AutoHotkey. That's the application that will tell you the name/id of the active window aswell as what is currently under the cursor if it can be identified as anything. Perhaps you get lucky? Probably not. Otherwise ZB always looked pretty open to me (seeing as you can save all the steps of your modeling and interface tweaks etc to hand to your friends or whatever, which must mean every action has a counterpart in script in ZB; Sorta like Maya.). Perhaps navigation could be changed with ZB scripting or sdk.

09-12-2006, 04:31 PM
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...

09-13-2006, 06:04 AM
I'm not an expert on Autohotkey but when you want three-key/button-combos and have combos that share buttons then it get's complicated. The simple notation I used to describa a hotkey - !LButton:: which is the same as Alt & LButton:: - only seems to allow two keys to be combined. You could possibly exceed that limit by playing around with loops and conditional statements (if) and stuff like KeyWait and GetKeyState. Personally I haven't looked over the docs for a long time and would not care to do it again at this time. I had a really hard time making my wilder scripts to work. I would not like to go there soon again. :)

There seemed to be alot of Autohotkey-enthusiast over the web though, so you might just try searching the web or visit the official forum (I think there was one).

Sorry I couldn't help.

09-13-2006, 09:32 PM
No problem. the script is a big improvement as is. Maya's navigation hotkeys work so much better with the tablet pen than LW's. I'll do a web search and see if I can find anything.

12-27-2006, 02:37 PM
Ok, AutoHotKey has been great with the Maya re-mapped keys in modeler, but now I'm doing a lot of stuff in Layout and it's not working with version 9 Layout. I did see Evenflow's response to someone else having this problem where Layout now has it's own name, but I have no idea where to find out what's it's being called. Does anyone know where I can find this out or how to get this AutoHotKey script working with version 9 Layout?

12-27-2006, 04:16 PM
Here's my version which works well.

alt-lmb rotate
alt-mmb pan x-z
alt-rmb pan y
alt-mouse wheel zoom

alt-lmb rotate
alt-mmb/rmb pan
alt-mousewheel zoom.

12-27-2006, 04:18 PM
Hm, the forum didn't attach the zip.
Here's the code anyway.

#IfWinActive Modeler ahk_class WMgrBasic

MButton:: ;When user presses Alt+MMB,
Send {/ Down} ;Send 'Ctrl+Alt+LMB pressed'
KeyWait MButton ;Wait until MMB is released
Send {/ Up} ;Then send 'Ctrl+Alt+LMB released'

#IfWinActive LightWave ahk_class WMgrBasic

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

Send +!{RButton Down}
KeyWait RButton
Send +!{RButton Up}

Send {.}

Send {,}

12-27-2006, 07:30 PM
Doh!:foreheads Nevermind my AutoHotKey problem. Turns out I had never set up my Wacom pen buttons for Layout. The script is working fine.