Store / Edit Commands Window

The quickstart section should have given you a good understanding of how to use the smartScripter. Let’s now have an in-depth look at the Store New Command and Edit Command windows.

Store New Command window

We can launch the Store New Command window by dragging code into the smartScripter main window or by clicking the Plus button in the middle of the smartScripter window. The up coming window looks like the following:

_images/store_window.jpg

The Store window contains the following details:

  • 1) Name: Enter a name for the new command.

  • 2) Language: Set which language to use when executing the command. Possible values are:

    • py: Python command.
    • tcl: TCL command.
    • nodes: Nuke node snippet. smartScripter will detect node snippets automatically once you paste them into the command field.
  • 3) Icon: Assign an icon for your command. This is optional.

  • 4) Color: Assign a color for your command. This is optional.

  • 5) Command: The actual command to execute.

  • 6) Save: Click to create your new command.

Setting the correct language

As smartScripter offers the ability to execute commands of various languages, it is important to set the correct language that your commands should be executed in. Executing a Python command in the TCL environment won’t work and vice versa. So please make sure to set up the language for your commands correctly.

Automatic node detection

When you paste a Nuke node snippet from your clipboard into the command field, smartScripter will detect this command as a node setup. It will automatically set up the command language to nodes and will assign a nuke icon to the command. You can change the icon afterwards if needed.

_images/node_detection.jpg

Assigning an icon

You can assign an icon to your command to quicker find it in the smartScripter window. This is optional. To assign an icon to your command, click the icons button at the top right.

_images/click_icons_button.jpg

This will open the Choose Icon window.

_images/choose_icon.jpg

It contains all png files of all folders of your nuke.pluginPath. If you would like to add any icon to this window, so that you can choose it, make sure to add the icons path to your nuke.pluginPath. To do so, add the following line to your init.py file in your Nuke home directory:

nuke.pluginAddPath("path/to/imagesfolder")

Keep in mind that smartScripter will only scan for png files.

You can click any of the icons in the Choose Icon window and this will assign the clicked icon to the command.

Assigning a color

You can assign a color to your command to quicker find it in the smartScripter window. This is optional. To assign a color to your command, click the color button at the top right.

_images/click_color_button.jpg

This launches a color picker that lets you set any color.

_images/color_picker.jpg

Click your desired color and click the OK button to assign this color to your command.

Edit Command window

In order to edit a command, right click the command and choose edit from the context menu.

_images/command_context_menu_edit.jpg

This launches the Edit Command window that looks identical to the Store New Command window, except it lets you edit the currently selected command. The window’s inputs will be set up with the data of the currently clicked command.

_images/edit_command.jpg

In here we can edit the following details:

  • Update the name. This will keep the original command as-is and will create a new command with the updated settings. This is useful to create command variations.
  • Update the underlying command.
  • Update the language to execute this command in.
  • Update the icon for this command.
  • Update the color for this command.

When you are done editing the command, click the blue save button and confirm to update. The changes take affect immediately.