viklc I also have to notice that the mapping only works for the root path (context), so if you are in a nested network and try to map the context, the root (context) will be mapped. I will change this in the next update, also mapping for dops and so on.
Ah, indeed. It works if I perform assignment from inside those "root" contexts. I rarely use them, so I was confused at first. My mistake.
I do have some other issues though.
First is that I can't figure out how to assign a desktop to a SOP context. There is no dedicated root context for SOPs, so the script shares assigned desktop with obj.
The second problem is that there are two different COP contexts - Cop2 and the new Cop, but currently the script treats them as one.
Perhaps it would be beneficial to use hou.Node.childTypeCategory()of a parent for identifying contexts?
Chop ChopNet Cop Cop2 CopNet Data Director Dop Driver Lop Manager Object Shop Sop Top TopNet Vop VopNet
This way not only we could assign desktops outside the root contexts, but we could also assign separate desktops to Sop, Object, Cop, Cop2 and perhaps some other networks I haven't tested. What do you think?
ajz3d Ah, indeed. It works if I perform assignment from inside those "root" contexts. I rarely use them, so I was confused at first. My mistake.
I not really describing the concept of using well, I will work on it, lets say it is currently in beta . Also looking for recording setup at moment, will release a video on this.
Sop, dops, vops and so on are currently not supported, only the root context, subnets such as lopnet adopt the assignment if you assign the stage contextfor example.
ajz3d This way not only we could assign desktops outside the root contexts, but we could also assign separate desktops to Sop, Object, Cop, Cop2 and perhaps some other networks I haven't tested. What do you think?
Certainly with the next release we will cover all type categories.
Here we go it is now node type oriented, you can even map custom hda types.
In the config file there is a new option, alias_mapping, which is true by default. This allows to map aliases, see configs alias_map. When turn on mapping a root obj context or a obj subnetwork will act like they are the same.
I have tidied up and optimized a bit, so you have to load the whole package once again: nodegraphdesk [github.com]
Edit: Added config option arbitrary nodegraph change. If turned on changes are made from any node editor, if not only those that are mapped. There is an issue, have to fix don't use this option for now.
I pulled the most recent version and it works like a charm!
By the way, with init_desktop_startupset to true(which is the default), I don't see any popups appearing during the start of the program. The only extraordinary thing is the indicator in the status line telling me that a Python script is running, but it lasts only one or two seconds. Though I'm not sure if it's initiated by nodegraphdesk or some other package.
ajz3d By the way, with init_desktop_startupset to true...
I remember you are on Linux, on Win get these popups: But I think we can live with
I just updated the package, arbitrary_nodegraph_change works now as well. And also instead of editor.isUnderCursor, hou.ui.paneTabUnderCursor() == editor is now queried, which checks the entire area of the node editor pane. This prevents changing to undesired desk when using the dropdown menu in the top bar and nodegraphs paths also work this way.