Skip to content
manne ohrstrom edited this page Jun 16, 2012 · 21 revisions

The Nuke engine contains a standard platform for integrating Tank Apps into Nuke. The Nuke Engine is light weight and straight forward and provides the following functionality:

  • It creates a Tank Menu in Nuke on which various items are displayed
![Tank Menu](images/menu.png)
  • It creates a Tank Node Menu in Nuke on which various items are displayed
![Tank Menu](images/nodes_menu.png)
  • It adds shortcuts to the file dialogs
![Tank Menu](images/favourites.png)
  • The engine also hooks up with the standard Nuke logging and debug, info, warning and error messages can be seen in the Nuke command window.

Information for App Developers

Apps with custom gizmos

The Nuke engine makes it easy to handle custom gizmos. If you are writing an app which uses custom gizmos, you can just drop them into a folder called gizmos and the nuke engine will automatically add that location to the nuke path:

![Nuke Gizmos](images/gizmo.png)

You can then easily access your gizmo via the create node functionality:

  • nuke.createNode("WriteTank")

Queue Implementation

The Nuke Engine implements the Engine Queue interface using the standard Nuke progress report toolbar. If you have code that is processing slowly, it probably make sense to wrap it via the queue in order to enhance the user experience.

The following code illustrates how the queue can be used:

def progress_test(sleep_time, progress_callback):
    # dummy process that sleeps and then reports progress
    for x in range(100):
        time.sleep(sleep_time)
        progress_callback(x)

# put some stuff on the queue
app.engine.add_to_queue("Fast sleeper", progress_test, {"sleep_time": 0.01})
app.engine.add_to_queue("Slow sleeper", progress_test, {"sleep_time": 0.05})
    
# and execute the queue - this call is blocking until the queue is empty
app.engine.execute_queue()    

This would result in the following output in Nuke:

![Nuke Queue](images/queue.png)
Clone this wiki locally