W_scaleTree v2.2


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Wouter Gilsing
UPDATED v2.2. A panel to quickly resize a selection of nodes in a controllable way by setting a pivot point. Works with backdrops.
Requirements:
11.0, 10.5, 10.0, 9.0, 8.0 or later
Linux, Mac, Windows
07 Mar 2018
1843

 

W_scaleTree

 

A panel to quickly resize a selection of nodes in a controllable way.

 

  • Offers the option to set a pivot point.
  • Allows the user to preform a uniform scale as well as scaling in separate axes.
  • Takes a node’s screensize into account to ensure a correct alignment.
  • Resizes backdrop nodes correctly to keep them fitting their content.
  • Use a shortcut to open and close a floating panel or use the tool as a docked widget.
  • Hotkeys 1, 2, 3 and 4 are setup to quickly set the pivot to a corner.

 

New in v2.0:

  • Added the option to evenly distribute the selected nodes.

New in v2.1:

  • Works properly inside groups.
  • Nuke 11 ready.

New in v2.2:

  • Bug fix.

 

 

 

Distribute your nodes evenly

 

Works with backdrops.


 

Use a shortcut to open and close a floating panel or use the tool as a docked widget.

 

Create a folder called 'icons' in your .nuke folder, and place the 'W_scaleTree' folder (the folder containing the icons) in there. If you would rather place the icons elsewhere, make sure to update this in the python code as well (line 25)

 Add the following to your menu.py

1
2
import W_scaleTree
nuke.menu('Nuke').addCommand('Edit/Node/W_scaleTree', 'W_scaleTree.scaleTreeFloatingPanel()', 'alt+`')
Please login in order to download these files.

Comments   

 
+3 # Frank Rueter 2016-05-13 03:37
haha, you beat me to it. I have a very similar tool sitting here half finished. Nice one!
 
 
+2 # Wouter Gilsing 2016-05-13 04:20
Haha, thanks, glad you like it!

If I missed any major features you had in mind and would like to share, let me know!
 
 
+1 # sridharan K 2016-05-13 12:00
Thanks for ur handy tool :) :D
Keep rocking :lol:
 
 
0 # Philippe HUBERDEAU 2016-05-14 10:32
Nice one Wouter ! Really smart way of doing it ! :-)
What about a rotation parameter by 90deg ? Can be handy...
Thanks a lot for this one !
 
 
0 # Wouter Gilsing 2016-05-14 16:56
Heey, thanks!

Personally, I don't think I would ever use that feature. However, if there are more people who would like to see the option to rotate your nodes, let me know and I will make sure it finds it way into an updated version of the tool.
 
 
0 # Charles Taylor 2016-05-16 20:51
I didn't even know I wanted this until I saw it - nice job!
 
 
0 # adam jones 2016-05-17 08:29
oh I like this,

it does what it needs to do but is it possible in a future version to add some thing that comes up when selecting nodes, a transform gadget, similar to what comes up when you select points of a roto. as it is is damn awesome.

love it ..
 
 
0 # Frank Rueter 2016-05-17 09:16
Hi Wouter. The version I started working on was interactive, so you'd hit a hotkey to pop into "scale nodes" mode, then click drag in the node graph to do the "scaling". Upon mouse release it terminates it's function.
If you are interested/have time I can send you the unfinished code and you can pick it to bits.
I do like your UI though :)
 
 
0 # Wouter Gilsing 2016-05-17 14:47
Heey Frank,

That would be great, it's always interesting to look at tools someone else wrote! I could try and see if it would be possible to somehow integrate it in the current tool.

Thanks :-)
 
 
0 # Frank Rueter 2016-05-17 23:46
I just mailed it through to you
 
 
0 # Vit Sedlacek 2019-03-17 19:45
Quoting Frank Rueter:
I just mailed it through to you

Hi Frank,

any news with the development of your tool? I'm just testing different tools for manipulating nodes out there and how you described your ideas is just exactly how I dreamed of this function to be ;) if you're not done yet, I'd even very much appreciate to see the code for inspiration :)

Thanks,
Vit
 
 
0 # Mitchell Kehn 2018-05-26 09:04
Hey Frank,

That sounds really cool! So what is it, like, a bounding box that shows up on the node graph that you can then drag around to rescale it?
I haven't been able to find anything in the docs about how to get any information on the view of the node graph (pan or zoom info). Is that how you're doing it? Or is it sliders that pop up or what?

Either way, I'd love to be able to read through your code if you've still got it around.
 
 
+2 # adam jones 2016-05-17 08:33
sorry for the extra post

and maybe some sort of fall off, so if you wanted to expand the space in the center of a comp, you could make that space with out where you needed it with out stretching out the hole node tree
 
 
+4 # Wouter Gilsing 2016-05-17 14:51
Interesting idea!

Are there more people here who would like to see this feature?
 
 
0 # Mitchell Kehn 2018-01-21 06:58
I definitely think that this would be useful, like if I could scale up my selected nodes without needing to worry about overlapping the surrounding nodes. There's definitely been situations where I've wanted to do this.

If I could put in my own feature request though, it would be for a more intuitive interface. My suggestion would be a rectangle drawn around the selected nodes (that only shows up when I hit a shortcut) that I can then drag on the corners or edges to adjust the scale.
 
 
0 # Anthony Thomas 2016-07-22 02:15
I added this to my menu.py

import W_scaleTree
nuke.menu('Nuke').addCommand('Edit/Node/W_scaleTree', 'W_scaleTree.sc aleTreeFloating Panel()', 'alt+`')

And that shortcut key doesn't work. Nothing happens when I press, Alt + '
 
 
0 # Anthony Thomas 2016-07-22 02:16
Nevermind. I figured it out. I placed it in the wrong spot. DERP.


Quoting Anthony Thomas:
I added this to my menu.py

import W_scaleTree
nuke.menu('Nuke').addCommand('Edit/Node/W_scaleTree', 'W_scaleTree.scaleTreeFloatingPanel()', 'alt+`')

And that shortcut key doesn't work. Nothing happens when I press, Alt + '
 
 
0 # Wouter Gilsing 2016-07-22 02:42
Cool:)

And make sure to press ` rather than '. It's the one that shares a key with the ~ and is located above Tab (or at least it is on my keyboard)
 
 
+1 # Remco Consten 2017-01-05 09:59
Great Tool, very useful. Would be nice if it would work inside a group though.

In one situation I thought the tool wasn't responding until I came out of the group graph... oops
 
 
+2 # Wouter Gilsing 2017-01-05 10:43
Ah good catch! I'll make sure that will be fixed in the next version. Thanks!
 
 
0 # Wouter Gilsing 2017-05-21 14:14
Hi Remco,

Just uploaded v2.1 which should work propely with nodes inside groups.

Cheers
 
 
0 # Anthony Dobbs 2017-03-16 20:20
This tool is fantastic! Too much power:-) Is there a way to get it to undo a scale if you accidentally get a funky result, like with the "distribute evenly" function? Thanks again for making this!
 
 
0 # Anthony Dobbs 2017-03-16 20:24
Hey, sorry, it already does this. I could've sworn it didn't there for a minute. Feel free to delete this request and comment :)
 
 
0 # Wouter Gilsing 2017-03-16 20:57
Well, that was about the easiest fix for me ever, haha :D
 
 
0 # Thomas Vu 2017-05-22 03:28
thank for new version update.
you make me feel you are programmer not compositor anymore haha :D
 
 
0 # Wouter Gilsing 2017-05-22 08:15
No worries!

And the two go together very well actually!
Would absolutely, no doubt, still consider myself a 'programming comper' though, rather than a 'comping programmer', haha.

Cheers
 
 
0 # Mitchell Kehn 2018-03-05 04:38
Hey Wouter, love your stuff!

Just letting you know that in v2.1, the anchor point selection seems a bit unsteady. It doesn't crash, but not all the buttons in the grid show up, and as you select them, they slowly disappear.

The sliders still work and are really great though! I'd be very excited if you ever implemented Frank's bounding box overlay too ;)
 
 
0 # Mitchell Kehn 2018-03-05 04:41
Never mind, I fixed my own problem within a minute of posting that. Whoops!

There was an issue with windows explorer when I copied the icons folder in, and it was missing icons 5-9. Replacing those, your work seems as flawless as ever. Great tool dude!
 
 
0 # Mitchell Kehn 2018-03-05 06:52
That said, I do actually seem to be finding a problem with the tool, in particular with the backdrop handling. It seems to break whenever I try to run it with a backdrop node that has any contents. It doesn't run as smoothly as that GIF in your demo.

Any thoughts?
 
 
-1 # Mitchell Kehn 2018-03-05 07:05
Fixed this by changing the variable "node" in the lambda function from line 263-265 to be called "sub_node".

Using "node" overwrote the backdrop that was stored in it beforehand, and threw all sorts of "NoneType" etc. errors.
 
 
0 # Wouter Gilsing 2018-03-05 11:37
Thanks for reporting!:) I'll update tonight.

Cheers
 
 
0 # Matthias Backmann 2018-03-08 14:22
Hey Wouter, this tool is awesome (once more - the hotbox was a miracle!)

I think it should become a "nodetree-shape"-tool.
One easy thing (I already added it under your buttons) would be to move every node with another slider, so that you can just push them up/down/left/ri ght. It's nice to get more space between certain groups of nodes and then you can scale the area inside this group to add more nodes.

Next step would be to mirror nodes - handy if you need to switch just the side of a mask input.

And I already read that a rotation-option was wished. This could be tricky, but f.E. if I have a mask input that's coming from above the node (vertical working vs. horizontal working ;-)) and then want to copy them to another node which has the mask coming from the side, I have to rearrange every node to make them fit smoothly. So rotating them around a pivot would be nice!
If you have an idea for these additional features, I think this tool would become even more fantastic!
 
 
+1 # Bernd M 2018-12-30 01:21
The moment I click onto a distribute evenly button I cannot use the slider anymore.
The cmd window spits out: object has no attribute 'nextView'
But also underneath I get the Non-Commercial mode 10-node python error... which might stop the script at some point and therefore break the cycles...
 
 
0 # Lundy Hu 2019-09-09 03:06
The shortcut key that is launched is alt+`.
What's the shortcut for closing?
:eek: :eek: :eek:
 
 
0 # Isaac Spiegel 2020-02-03 15:51
The default 1 through 4 hotkeys clash with the viewer hotkeys for each view and causes an 'Ambiguous Shortcut Overload'
 
 
0 # Robin Od 2020-02-24 09:52
Unfortunately the plugin doesn't work for me anymore in Nuke 12.0v3
Any chance that there will be an update?
 
 
+1 # Wouter Gilsing 2020-02-24 09:54
Heya,

I'll have a look at this when I got some time on my hands!

Cheers
 
 
0 # Robin Od 2020-03-10 11:15
I don't know why, but it suddenly started working again, even though I didn't switch to another version or something like that.
Thanks anyways for your quick answer and willingness to update it. I absolutely love that tool.
 
 
0 # Fernando Arbelaez 2021-06-22 19:19
I've just moved to a new env running 12.2v3 and the tool is not working anymore. :cry:
 
 
0 # kotopoulla kotopoulla 2020-10-14 09:47
Thanks mate! Hope u are well That sounds super handy! Ur neighbour back in Guardian of galaxy 2 times, in the old Framestore office!

Best
Nicholas Zissimos
 
 
+1 # Jose Enriquez 2021-08-04 18:58
This is an amazing script, any plans to make it run out of the box in nuke 13?
 
 
+2 # Jose Enriquez 2021-08-04 18:58
This is an amazing script, any plans to make it run out of the box in nuke 13?
 
 
+3 # Tor Andreassen 2021-09-19 11:51
hey Wouter, this is now my new favorite tool to scale stuff with, nice work! It's particular handy with large aov breakout builds that needs more space to mock around with the passes :)

Just one request if i can, is it possible somehow to scale backdrops in an alternative way so it also scales it vertically along with the rest of the tree? right now it scaled so it stays in place. height scales correctly but width seems to just stay more or less the same width if you scale horizontally or uniform. try with for example an aov breakout that has backdrops around the passes and you'll see what i mean. hope this explains what i mean..

Either way if its possible or not, fantastic tool as always man! :)
 
 
0 # Alexey Kuchinski 2022-08-11 20:24
I second Tor's request, if two backdrops located one next to each other they will not scale correctly.
We solve this issue in not very elegant way - putting dots in corners of backdrops, but curious if you could solve it in a proper way.
Thank you so much!!!!
 
 
0 # Ricardo Sousa 2022-12-27 17:49
Hi! I love the script, but in my NK Non-Commercial is not working properly, I don't if it has to do with some Python limitations in this version or the Nuke's version, I'm in Nuke 14.

Thank you!!
 
 
0 # M sly 2024-02-19 13:36
i installed it but i dont know how it works cant find it in nuke
 

You have no rights to post comments

We have 3432 guests and 61 members online