top of page

GM_SCRIPT BOOST

`Script Boost` is a simple tool to help you with making large scripts more manageable. 

The node DOESN'T NEED TO BE CONNECTED TO ANY PIPE TO WORK!

It can be an `independently floating` node that you can use when your script starts to slow down

in order to optimize your workflow.

Let`s see how you can use it and how it works:

02_sboots_node_2.jpg
03_sboost_ui_2.jpg

POSTAGE STAMP/

- ` Disable Postage Stamp`: Disables the `Postage Stamp` on the following nodes in the script: Read, PostageStamp, Constant, ColorBars, CheckerBoard, ColorWheel.

nodes_classes = ["Read", "PostageStamp", "Constant", "ColorBars", "CheckerBoard2", "ColorWheel"]

 

for node in nuke.allNodes(group=nuke.root()):

    if node.Class() in nodes_classes:

        try:

            node["postage_stamp"].setValue(False)

        except Exception:

            pass

- `Enables Postage Stamp`: Enables the `Postage Stamp` on the following nodes in the script: Read, PostageStamp, Constant, ColorBars, CheckerBoard, ColorWheel.

nodes_classes = ["Read", "PostageStamp", "Constant", "ColorBars", "CheckerBoard2", "ColorWheel"]

for node in nuke.allNodes(group=nuke.root()):

    if node.Class() in nodes_classes:

        try:

            node["postage_stamp"].setValue(True)

        except Exception:

            pass

- `Disable Selected Postage`: Disables the `Postage Stamp` on the following selected nodes in the script: Read, PostageStamp, Constant, ColorBars, CheckerBoard, ColorWheel.

nodes_classes = ["Read", "PostageStamp", "Constant", "ColorBars", "CheckerBoard2", "ColorWheel"]

for node in nuke.selectedNodes(group=nuke.root()):

    if node.Class() in nodes_classes:

        try:

            node["postage_stamp"].setValue(False)

        except Exception:

            pass

- `Enable Selected Postage`: Enables the `Postage Stamp` on the following selected nodes in the script: Read, PostageStamp, Constant, ColorBars, CheckerBoard, ColorWheel.

nodes_classes = ["Read", "PostageStamp", "Constant", "ColorBars", "CheckerBoard2", "ColorWheel"]

for node in nuke.selectedNodes(group=nuke.root()):

    if node.Class() in nodes_classes:

        try:

            node["postage_stamp"].setValue(True)

        except Exception:

            pass

Recommended using when dealing with contact sheets for example.

05_sboost_postage_contact.jpg

`Postage Stamps` enabled

05_sboost_postage_1.jpg

`Postage Stamps` disabled

05_sboost_postage_2.jpg

NODE PERFORMANCE/

 

This part helps you to find heavy nodes or bugs that slow down or errors your script. As showing this information slows down the script it is recommended to turn off (Hide) once you don`t need it.

 

- `Show`: Shows the nodes` performance that is connected to the `Viewer`.

nuke.startPerformanceTimers()

 

for n in nuke.allNodes(recurseGroups = True):

 print n.fullName()

 print n.performanceInfo()

- `Reset`: Resets the performance timer.

nuke.resetPerformanceTimers()

- `Hide`: Stops the performance timer.

nuke.stopPerformanceTimers()

04_sboost_timer_1.jpg

When you turn the Performance Timer on you see the following information:

 

  • callCount tells you the number of times this part of the processing has been called.

  • timeTakenWall is the time taken as it would be measured by a clock on the wall, i.e. the actual time a user would have to wait for the processing to complete. This time is measured in microseconds.

  • timeTakenCPU:

    • On Linux, this is the time the CPU spent executing the processing code, and again is measured in microseconds. It is an aggregate over all CPU threads so, for example, for the multi-threaded engineprocessing this will typically be much larger than the wall time. If the average CPU time per thread (timeTakenCPU divided by the number of threads used) is much shorter than the wall time, this suggests that the CPU threads have spent a lot of time not executing code - for example, waiting on locks - and could indicate a performance problem.

    • On Mac and Windows, the CPU time is not currently available; on Mac, this value will be the similar to the wall time.

 

If you want to dig deeper HERE`S THE FOUNDRY`S WEBSITE on the subject!

Hope you will find it useful! 

 

Here's the GitHub link ( just select the text and copy to Nuke )

 

Huge thanks for making the code simpler to Rhys Fernandes!

bottom of page