API

smartWrite offers several features to enhance Nuke’s Write/DeepWrite/WriteGeo nodes (in the following called output nodes) as seen in the previous pages. All functionality can be accessed via smartWrite’s output settings window, via commands in the menubar and via custom shortcuts that you can assign using the smartWrite main window as previously seen.

You can however also trigger all custom functionality via code as they are offered through a public API. These are described in the following.

Read from Write

To create a Read from Write select an output node and execute the following code:

from smartWrite import create_read_from_write
create_read_from_write()

Copy File path

To copy the currently selected output node’s filepath into your clipboard execute the following code:

from smartWrite import copy_filepath_to_clipboard
copy_filepath_to_clipboard()

Reveal in explorer

To reveal the currently selected output node’s filepath in your explorer execute the following code:

from smartWrite import reveal_in_explorer
reveal_in_explorer()

Render current framerange

To quickly render all selected output nodes with the currently set up frame range of your currently used Viewer node execute the following code:

from smartWrite import render_current_framerange
render_current_framerange()

Explode rendering

To explode a Read/DeepRead/WriteGeo back into its nodes (given a backup exists, i.e. backup save on render was enabled when rendering) execute the following code:

from smartWrite import explode_into_nodes
explode_into_nodes()

Launch smartWrite main window

To launch the smartWrite main window execute the following code:

from smartWrite import osl as smartwrite
smartwrite.show_main()

Launch smartWrite output settings window

To launch the smartWrite output settings window select an output node and execute the following code:

from smartWrite import osl as smartwrite
smartwrite.show_output_view()