View Full Version : Opening and closing windows (specifically the node editor window) with python?

10-08-2013, 08:36 PM
I'd love to have a keyboard shortcut to open and close the node editor window. I use it for everything, and usually have to go full screen to fit my more complicated node networks into it. But there's no way of assigning a keyboard shortcut because it doesn't appear in the command list. Does python have control over UI things like this? I'm ok at python, but I haven't yet investigated writing python plug-ins for LW.

10-17-2013, 05:50 AM
Node editor is part of the nodeEditor global LWNodeEditorFuncs... You can't just enter some command to open/close them like clicking the button in the interface, as they pop up so many places. You need to get (or create) an instance of a node window and operate on that object. Im not sure which bits of this are available to python yet (havent dug so much), but check out the Globals section of the sdk for more info.

10-21-2013, 10:03 PM
There is no single Node Editor. Although there is just one window visible at a time, there is dozen of Node Editors in whole app.
To open Node Editor you have to call LWNodeEditorFuncs->openNodeEditor( NodeEditorID );
So you need to know which exactly Node Editor you want from perhaps hundreds.
You can get one from LWSurfaceFuncs->getNodeEditor( LWSurfaceID );
Again you need to know which surface is active.
And this info is not available in LWSurfaceEditorFuncs.
We could create a tool opening Node Editor of the first surface of currently active item, but if you would select 2nd surface, it will open again 1st surface Node Editor (whatever is on top of surface list).

10-21-2013, 10:14 PM
Does that mean you could have multiple node editors open at once? That would be good, when you're copying nodes from your instancer to your nodal motion and displacement to your surface.