Showing posts with label Node Operations. Show all posts
Showing posts with label Node Operations. Show all posts

Saturday, May 11, 2013

Enhancing Workflow

Some nodes in the Other category of the Nodes toolbar are used to enhance the workflow. The StickyNote node is used to add notes to the Node bpanel. The notes can be text or HTML markup. Generally, they are used as annotations to other nodes in the Node Graph panel. You can use the Dot node to make bends in the connecting pipes. It helps you in organizing your script better. The PostageStamp node is used to display a thumbnail render of the output at the current frame. This node does not alter the data stream. The nodes used to enhance the workflow are discussed next.

Using the StickyNote Node
The StickyNote node is used to add annotation to nodes in the Node Graph panel. To add a note to the Node Graph panel, click on the area of the Node Graph panel where you need to add a note. Next, choose the Other button from the Nodes toolbar; the Other menu will be displayed. Now, choose StickyNote from the menu; the note will be displayed in the Node Graph panel. To change the note text, enter new text in the label field of the StickyNote# node properties panel. You can also enter HTML markup such as <b> your_note_text_here </b> for note to appear in bold or <i> your_note_text_here </i> for note to appear in italics in the Node Graph panel. You can also add an image to your note. To do so, use <img src=”your_logo.png”/> HTML markup.
Note: The commonly used image formats can be used for the logo but using the png format is highly recommended. Also, you need to save the image files in the plug-in path directory (C:\Program Files\Nuke7.0v4\plugins) in order to make images appear on the notes.
The Precomp node is also used to enhance the workflow. To know more about this node, click here. The Dot node is used to create bend in the pipes that connects two nodes. This node helps in organizing the node network in the Node Graph panel. To know the use of this node, click here.

This article is taken from the Nuke Book: The Foundry Nuke 7 for Compositors.

Grouping Nodes

You can group (visually organize) nodes in the Node Graph panel using the Backdrop node or the Group node. The Backdrop node is used to visually organize areas of the Node Graph panel. The Group node is used to group several nodes into a single node, and the group node thus created acts as a container for these nodes. The Backdrop and Group nodes are discussed next.

Grouping Nodes Using the Backdrop Node
To group nodes using the Backdrop node in the Node Graph panel, choose the Other button from the toolbar; the Other menu will be displayed. Next, choose Backdrop from the menu; the BackdropNode# will be inserted in the Node properties panel, refer to Figure 1. In the Node Graph panel, drag the triangle on the lower right corner of the Backdrop node to increase its size, as required. Next, press and hold the left mouse button over the title of the box and then drag the node and slip it under the nodes that you need to visually organize, refer to Figure 2. Next, click on the empty area of the Node Graph panel and then drag the title of the Backdrop# node. You will notice that nodes grouped using it move together with it.
Figure 1 The BackdropNode1 node inserted in the Node Graph panel

Figure 2 The Grade1Blur2, and ColorCorrect2 nodes visually grouped using the BackdropNode1 node
To display the properties panel of the Backdrop node, double-click on it in the Node Graph panel. To change the color of the Backdrop node, choose the tile_color button from the BackdropNode# properties panel; the BackdropNode#.title_color window will be displayed. Next, select the color as required. To change the name of the Backdrop node, enter the new name in the name field of the Backdrop node properties panel. To delete the Backdrop node and the nodes it contains, click once on the title of the node and then press DELETE. To delete only the Backdrop node, CTRL+click on the title of the node and then press DELETE.

Grouping Nodes Using a Group Node
To group nodes using the Group node, select the nodes that you need to group. If you want to replace the original nodes with the Group node, choose Edit > Node > Group > Collapse to Group from the menu bar or press CTRL+G; the Group# node will be inserted in the Node Graph panel. Also, a new panel will be displayed with the name Group# Node Graph.

To expand (ungroup) a group, select the Group# node in the Node Graph panel and then choose Edit > Node > Group > Expand Group from the menu bar or press CTRL+ALT+G. To open the Node Graph panel for the group, select the Group# node in the Node Graph panel and then choose Edit > Node > Group > Open Group Node Graph from the menu bar or press CTRL+ENTER. Alternatively, you can press the show button in the Group# node properties panel.

To keep the selected nodes in the Node Graph panel, choose Edit > Node > Group > Copy Node To Group from the menu bar or press CTRL+ALT+SHIFT+G; a free floating Group# node will be created in the Node Graph panel along with a separate Group# Node Graph panel.

This article is taken from the Nuke Book: The Foundry Nuke 7 for Compositors.

Cloning nodes

Clones are used to maintain consistency throughout the script. Cloned nodes inherit the values of their parent nodes maintaining an active link with them.
Note: You can not clone gizmos used in NukeX even if they are user created or built-in.
To clone a node, select the node in the Node Graph panel. Next, choose Edit > Clone from the menu bar or press ALT+K; NukeX will create a clone of the selected node and maintain an active link with the parent node. A clone indicator (C) will be displayed on both the nodes and they also share the same name. To declone nodes, select them and then choose Edit > Declone from the menu bar or press ALT+SHIFT+K; NukeX will declone the selected nodes and remove the active link. Two nodes can be forced to be clones in a script. To do so, select first node. Next, press and hold SHIFT and then select the second node. Next, choose Edit > Force Clone from the menu bar or press CTRL+ALT+SHIFT+K; NukeX will make the first node as forced clone of the second node.

This article is taken from the Nuke Book: The Foundry Nuke 7 for Compositors.

Editing Nodes in the Node Graph panel

Standard shortcut keys (CTRL+C, CTRL+V, and CTRL+X) are used to perform editing operations on the nodes. To copy a node in the memory, select the node and then choose Edit > Copy from the menu bar. Next, click on the empty area of the workspace to deselect any selected node and then choose Edit > Paste from the menu bar; an exact copy of the selected node is created in the Node Graph panel.
Note: When you paste nodes, NukeX automatically connects them to the node that is selected before the paste command.
You can also copy nodes to the files. To do so, select the node that you need to copy in the Node Graph panel. Next, choose File > Export Nodes As Script from the menu bar; the Export Nodes As Script dialog box will be displayed. Next, navigate to the folder where you want to save the script and enter name of the script in the pathname field. Next, choose the Save button. NukeX will save the selected node as a script with the specified name. Start Notepad and open the saved script in it to view its content. Figure 1 shows the content of the ColorCorrect node script opened in Notepad application.
Figure 1 The ColorCorrect node script displayed in Notepad
You can import the saved script files in NukeX as a node. To do so, choose File > Import Script from the menu bar; the Import Script dialog box will be displayed. Next, navigate to the folder where you have saved the script and then select the script file. Next, choose the Open button from the dialog box; the selected script file will be imported in the Node Graph panel.

To cut the node from the Node Graph panel, select the node and then choose Edit > Cut from the menu bar; NukeX will remove the selected node from the script and write it to the memory. Next, select the node that you need to connect with the node in the memory. Choose Edit > Paste from the menu bar; NukeX will insert nodes to the Node Graph panel from the memory.

To create a duplicate node, select the node in the Node Graph panel and then choose Edit > Duplicate from the menu bar or press ALT+C. A duplicate of the selected node will be created in the Node Graph panel. To delete a node, select the node in the Node Graph panel and then choose Edit > Erase from the menu bar or press DELETE; the selected node will be removed from the Node Graph panel. To disable or enable a node, select the node that you want to disable or enable in the Node Graph panel and then choose Edit > Node > Disable/Enable from the menu bar.
Tip: To toggle between enable and disable modes of a node, press D.
This article is taken from the Nuke Book: The Foundry Nuke 7 for Compositors

Selecting, Replacing, and Renaming Nodes

When you select nodes in the Node Graph panel, the selected nodes are displayed in a light yellow color. Various methods of selecting the nodes are discussed next. To select a single node, click on the node once. To select multiple nodes, press and hold SHIFT and then click on each node that you need to select. Alternatively, you can draw a marquee selection around the nodes to be selected. All the nodes that lie within the marquee will be selected. To invert a selection, choose Edit > Invert Selection from the menu bar.

To select all upstream nodes, press and hold CTRL while dragging a node; all upstream nodes that feed data to the dragged node will be selected. Next, click once in the empty workspace to clear the selection. To select all downstream and upstream nodes connected to a node, click once on the node and then choose Edit > Select Connected Nodes from the menu bar. Alternatively, you can press CTRL+ALT+A to select all nodes connected to the selected node. To select all nodes, choose Edit > Select All from the menu bar. Alternatively, press CTRL+A to select all nodes in a script.
Tip: Press and hold CTRL+SHIFT and then click to select one or more nodes without clearing the selection made earlier.
To select a node by its name, choose Edit > Search from the menu bar; the Nuke dialog box will be displayed. Type the name of the node in the search field and then choose the OK button; the node will be selected in the Node Graph panel. Also, the selected node will be centered in the visible workspace area. You can also use wild cards to select nodes by the name. You can use asterisks for multiple alphanumeric search strings and question marks for representing a single character search.

You can also select nodes based on their color, class, and label. For example, to select nodes based on the color, select a node and then choose Edit > Select Similar > Color from the menu bar; all nodes having the same color will be selected in the Node Graph panel.

Replacing Nodes
To replace a node, select the node in the Node Graph panel that you need to replace. Next, press and hold CTRL and create new node using the Nodes toolbar, shortcut menu, or the TAB menu; the selected node will be replaced by the new node.
Tip: To replace a node with the TAB menu, select the node in the Node Graph panel that you need to replace. Next, press TAB and then type first few characters of the name of the node. Next, press and hold CTRL and then select the new node from the TAB menu. If you are using a hotkey, you can not replace nodes using this method.
This article is taken from the Nuke Book: The Foundry Nuke 7 for Compositors.

Working with node connections

Once you add nodes to the Node Graph panel, you need to establish the connections between nodes to form a network. Most of the nodes have the Input, Output, and Mask connectors. These connectors determine the order in which the data stream is passed through the nodes. Figure 1 shows the connectors on the Blur1 node. Some nodes such as Merge has two input connectors: A and B. Figure-1 shows the connectors of a Merge node.

Figure 1 The Blur1 and Merge1 nodes
Disconnecting Nodes
To disconnect a node, press and hold the left mouse button on the head or tail of the connecting arrow and then drag the cursor to an empty area of the Node Graph panel. Alternatively, you can select the node and then press CTRL+D.

Reconnecting Nodes
To reconnect a node, press and hold the left mouse button on the head or tail of the connecting arrow of the node that you want to connect. Now, drag the cursor to the center of the node to which you need to make the connection and then release the left mouse button; a connection will be established between the two nodes. Alternatively, select the node (lower in the hierarchy) that you want to connect and then press and hold SHIFT. Next, select the node that you need to connect to and then press Y; a connection will be established between the two nodes.

Extracting Nodes
To extract the node, select the node that you need to extract from the node network and then choose Edit > Extract from the menu bar; the selected node will be extracted from the node network and will be placed as a free floating node in the Node Graph panel. Alternatively, you can press CTRL+SHIFT+X to extract the node. Figure 2 shows the Grade2 node extracted from the node network.

Figure 2 The extracted Grade2 node
Swapping Inputs of Nodes
Some nodes like Merge have two inputs: A and B. To swap the A input with the B input, make sure that the Merge node is selected in the Node Graph panel and then choose Edit > Node > Swap A - B from the menu bar. Alternatively, you can press SHIFT+X to swap the inputs. Figures 3 and 4 show the default and swapped inputs, respectively.

Figure 3 The default A and B inputs

Figure 4 The swapped inputs
Starting a New Branch from a Node
To create a new branch from a node, select the node from which you want to create a new branch. Next, press and hold SHIFT and then add new node using the Nodes toolbar, TAB menu, shortcut menu, or the shortcut key. Figure 5 shows two branches originating from the Blur3 node.

Figure 5  The branches originating from the Blur3 node

Duplicating the Connecting Arrow
To duplicate the connecting arrow, press and hold SHIFT and then drag the head of the output connecting arrow; a duplicate connection pipe will be displayed. Next, drop the pipe onto the node that you want to connect. This will duplicate the connecting arrow without affecting the original connection. Figure 6 shows a duplicate output arrow connected to the Grade2 node from the Blur2 node.

Figure 6  Duplicating a connecting arrow
This article is taken from the Nuke Book: The Foundry Nuke 7 for Compositors.

Inserting and Manipulating Nodes

You can insert a node in the Node Graph panel by using the Nodes toolbar, the TAB menu, the shortcut menu, or shortcut keys. All these methods are discussed next.

Inserting Nodes Using the Nodes Toolbar
To insert a node using the Nodes toolbar, choose the required category button from it and then choose the node from the menu displayed. Figure 1 shows the nodes available in the Image menu. The chosen node will be inserted in the Node Graph panel, refer to Figure 2. You will notice that whenever you insert a new node in the Node Graph panel, its properties panel will be displayed in the Properties Bin, refer to Figure 3.
Tip: You can insert the last chosen node from the Nodes toolbar by pressing the middle mouse button on the category button.
Figure 1 The Image menu displayed on choosing the Image button
Figure 2  The Constant1 node inserted in the Node Graph panel on choosing Constant from the Image menu
Figure 3 The Constant1 node properties panel displayed on inserting the Constant1 node in the Node Graph panel
Figure 4 The Constant1 node connected to the port 1 of the Viewer1 node
Inserting Nodes Using the Shortcut Menu
To insert a node using the shortcut menu, right-click on the Node Graph panel; a shortcut menu will be displayed. Choose the required category from it; a cascading menu will be displayed, refer to Figure 5. Choose the node from the cascading menu as required to insert it in the Node Graph panel.

Figure 5  Partial view of the Draw cascading menu

Note: If a node is selected in the Node Graph panel then on adding a new node, it will be automatically connected to the selected node, else it will be a free floating node.

Inserting Nodes Using the TAB Menu
To insert a node using the TAB menu, hover the cursor over the Node Graph panel and then press TAB; the TAB menu will be displayed. Next, type the first few characters of the name of the node to be inserted in the TAB field; NukeX will display all the nodes whose names begin with the typed characters. You can use the UP or DOWN arrow key to navigate through the menu. Next, select the required node in the TAB menu and then press ENTER; the selected node will be inserted in the Node Graph panel.
Tip: To reinsert the last node from the TAB menu, press TAB followed by ENTER.
Inserting Nodes Using the Shortcut Keys
To insert a node using the shortcut keys, click on the Node Graph panel to make it active and then press the shortcut key corresponding to the node that you need to add. The shortcut keys corresponding to the nodes are displayed in the category menus. These menus are displayed when you choose the category button from the Nodes toolbar.

This article is taken from the Nuke Book: The Foundry Nuke 7 for Compositors.