SetLoop v1.2


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Max van Leeuwen
Loop nodes - an iterator/for each loop/solver for Nuke
Requirements:
11.0, 10.5, 10.0, 9.0, 8.0, 7.1, 7.0, 6.3, 6.2, 6. or later
Linux, Mac, Windows
26 Nov 2017
119

example_1example_4

(Examples of a Mandelbrot set render, and Reaction Diffusion - made using SetLoop)

 

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.

 

Node graphNode properties

 

Features:

  • 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.

 

Installation

Option 1 - Easiest way:

  1. 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:

  1. Copy the 'NukeShared.nk' file to wherever you like to install your plugins.
  2. Go to your '.nuke' folder and open (or, if it does not exist yet, create) the 'menu.py' file.
  3. 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'):

  1. Go to maxvanleeuwen.com/nukeshared and download/install the NukeShared script (which will automatically load plugins when they're in your appointed plugin folder).
  2. Place 'SetLoop.nk' in your custom plugin folder and start Nuke.

 

Updates

v1.2

Added new method for looping ('parallel'), fixed compatibility with Nuke 11 (pyside2), added stats.

v1.1

Fixed a bug, cleaned UI, better tooltips.

Please login in order to download these files.

Comments   

 
+1 # Adrian Pueyo 2017-07-22 21:52
This is great! Thanks for sharing
 
 
# Max van Leeuwen 2017-08-01 12:08
Thanks! Glad you like it :)
 
 
+1 # Sven Akelian 2017-10-09 10:19
How could I miss that one!

Amazing idea and pretty reactive ( see what I did there ;) )
 

You have no rights to post comments

We have 3229 guests and 102 members online