Steps¶
smartRescue offers multiple steps out of the box. These can be used to get a certain range or specific nodes of your working file selected and handle them by disabling, deleting or disconnecting them from the stream. Additionally, a few steps let you create additional information about your working file. Creating new steps, is possible as well and gets discussed here. All steps are discussed in the following.
Step ‘AllNodes’¶
Handle all nodes in the DAG but skip all nodes of specified node classes.
Widgets¶
- mode: Choose how to handle matching nodes.
- skip: List of node classes to skip processing.
Examples¶
1) Disable all nodes
2) Delete all Nodes except of Read nodes
Step ‘CopyLines’¶
Copy all lines between first_line and last_line to a backup file.
This is useful to debug at which node of a working file the file itself gets corrupt and will possibly crash when opening the working file. Keep in mind that you should set the first line at the beginning of a node and the last line at the end of a node to prevent from generating working files with incomplete node structures. For that you will need to view the working file using a text editor (all .nk files are simply ascii files that you can view with your text editor).
Widgets¶
- first_line: The first line to include in the new file.
- last_line: The last line to include in the new file.
Examples¶
1) Keep only lines 1 to 37
2) Copy everything except the last X lines
Step ‘NodesByClass’¶
Handle all nodes of the configured node classes in the DAG.
This processes recursively, meaning we include also all nodes being nested inside Group nodes.
Keep in mind that some node classes are versioned inside Nuke, e.g. Merge2, Camera2, Tracker4, etc. If in doubt about the node class, create a node and press ‘I’ to show the node info window. In this window you can also see the node class of the selected node.
Widgets¶
- mode: Choose how to handle matching nodes.
- node_classes: Node classes to include handle.
Examples¶
1) Delete all Viewer nodes
2) Disable all ‘Reformat’ and ‘Write’ nodes
3) Disconnect all ‘Defocus’ nodes from the stream
Step ‘NodesByKnobValues’¶
Handle nodes in the DAG matching one of the knob rules.
This will search all nodes in the DAG. If any node contains the following knob and the operator matches the given value then we handle the node as configured.
The following operators are supported:
== equal != not equal < less than <= less than or equal > greater than >= greater than or equal
Widgets¶
mode: Choose how to handle matching nodes.
disable: Will disable nodes. delete: Will delete nodes. disconnect: Will disconnect the nodes from the stream.
*knob_rules: Rules to apply to the process:
- node_class: Name of the class to consider
- knob_name: name of the knob
- operator: operator to use for a match
- knob_value: knob value to match
Examples¶
Step ‘NodesByKnobValuePattern’¶
Handle all nodes in the DAG that knob names match one of the patterns.
This will iterate over all nodes and check if the given key (knob name) exists and checks if the pattern for that knob matches in the knob’s value. To check the node name itself, we can use the node’s ‘name’ knob, which contains the name of the node.
Widgets¶
mode: Choose how to handle matching nodes.
patterns: List of knob names and patterns to match: in the
- knobname: Name of the knob
- pattern: Pattern to match
Examples¶
Step ‘NodesByName’¶
Handle all nodes in the DAG where the node’s name is one of the following.
This will search for all nodes that contain one of the configured names and will handle these nodes.
Widgets¶
- mode: Choose how to handle matching nodes.
- nodes: All node names that will be considered a match.
Examples¶
Step ‘RemoveNonAscii’¶
Remove non ASCII characters from the working file.
ASCII (American Standard Code for Information Interchange), is a character encoding standard for electronic communication and represents text in computers. All Nuke working files should only contain characters within the ASCII table of 1-127. When using external gizmos and third-party plugins, chances are given that the authors include ASCII characters in their tools that are outside the ASCII table of 1-127 - especially if the authors live in non english speaking countries and are not aware of this fact. Characters outside the legal range will stop Nuke from parsing the working file, resulting in not loading the whole Nuke script. For more information about ASCII have a look at: https://en.wikipedia.org/wiki/ASCII
This step removes all illegal character from the working file that fall outside the legal character table range of 1-127.
There is nothing to configure in this step.
Step ‘ReplaceByPattern’¶
Replace sections in the working file by using regular expression patterns.
This will search the working file for given patterns and will replace it with the given substitution.
Widgets¶
replace: Input that will be replaced to the given output:
- input: Input to search for.
- output: Value to replace the match to.
Examples¶
Step ‘ScriptInfo’¶
Generate text file containing info about the working file.
This info includes:
- Working file name
- Number of nodes in the dag
- Total number of nodes including nodes in Group nodes
- All footage paths
- First frame and last frame
- Number of nodes within a class that can be configured
Widgets¶
- number_nodes_by_class: These nodes will be counted in the generated report.
- root_info: Names of the root’s knobs that we want to include in the generated report.
Examples¶
root:
- format
- fps
- project_directory
- colorManagement
- OCIO_config
- onScriptLoad
- onScriptSave
- onScriptClose