This location is for Registered Users Only.
Perhaps you need to login or register.
11.0, 10.5, 10.0, 9.0, 8.0, 7.1, 7.0, 6.3, 6.2, 6. or later
Linux, Mac, Windows
(Examples of a Mandelbrot set render, and Reaction Diffusion - made using SetLoop)
SetLoop is a toolset for Nuke that can loop a set of nodes a specific amount of times (like a for each loop, an iterator, or a solver).
It basically copies the nodes you place between Loop_Begin and Loop_End inside Loop_End (a group), and reconnects them. But there are many more features to it which, combined, make this an actually functional image solver that can render fractals and reaction diffusion entirely inside Nuke.
- relink external inputs if nodes in the loop are connected to nodes outside the loop, this will make sure they are relinked automatically by adding exra inputs to Loop_End to which the nodes connect (this is enabled by default, as it does not change anything if no external inputs are present)
- relink external expressions for all expressions referencing nodes which are not part of the loop, this will make sure to add 'parent.' before every nodename and replace 'parent.' with 'root.' for every node not being looped
- this way, they'll still be connected from inside the group (this is disabled by default, as it could mess up expressions if user variables have the same name as nodes)
- add loop count knob the nodes inside the loop will get an index count knob ('loopcount' (int)) which can be used to create different values or random seeds for each loop iteration
- the original nodes (the ones in the backdrop in the main graph) will also get this knob, with index 0 (this is disabled by default, as it interferes with all nodes in the loop)
- offset offset the loop count knob (0 by default)
- only available when 'add loop count knob' is enabled
- loops amount of loops to create
- method 'sequential' loops like an iterator, 'parallel' creates multiple instances of the same input and merges them together when using 'parallel', make sure to add a random value to an expression or to use the 'add loop count knob' for visible results ('sequential' is the default, as this is a more commonly used loop)
- set bake/clear the loop
- scroll animate the loop level
- invert invert the direction of the scroll
- only available with method 'parallel'
- blend blends the loop levels when scroll is not a round number
- spread feather the loop levels
- only available with method 'parallel' and 'blend' enabled
- stats current stats
- [tab] constants room for user knobs that can be referenced to from inside the loop (e.g.: 'constant_float')
- constant_float this does nothing
- it can be referenced to using 'constant_float' or removed, if you don't like it
Please send suggestions, bug reports, and other feedback!
I'd love to know if you created something cool with this.
Option 1 - Easiest way:
- Copy the 'NukeShared.nk' file to your '/.nuke/toolsets/' folder. If the 'toolsets' folder does not exist, create it yourself.
The '.nuke' folder can be found in here:
- Linux: /home//.nuke
- Mac OS X: /Users//.nuke
- Windows: :\Users\\.nuke
Option 2 - A bit more advanced, but with a nice toolbar button:
- Copy the 'NukeShared.nk' file to wherever you like to install your plugins.
- Go to your '.nuke' folder and open (or, if it does not exist yet, create) the 'menu.py' file.
- At the end of that file, append the following text:
toolb = nuke.menu('Nodes')
pluginpath = 'Enter/the/full/path/to/NukeShared.nk'
toolb.addCommand('SetLoop', 'nuke.createNode('' + pluginpath + '')')
Option 3 - Using my custom plugin loader for nuke ('NukeShared'):
- Go to maxvanleeuwen.com/nukeshared and download/install the NukeShared script (which will automatically load plugins when they're in your appointed plugin folder).
- Place 'SetLoop.nk' in your custom plugin folder and start Nuke.
Added new method for looping ('parallel'), fixed compatibility with Nuke 11 (pyside2), added stats.
Fixed a bug, cleaned UI, better tooltips.