Examples

The following examples can also be found in Hiero’s site-packages directory, located here:

Mac OS X

/Applications/Nuke15.1.3/Nuke15.1.3.app/Contents/MacOS/pythonextensions/site-packages/hiero/examples/

Linux

/usr/local/Nuke15.1.3/pythonextensions/site-packages/hiero/examples/

Windows

C:\Program Files\Nuke15.1.3\pythonextensions\site-packages\hiero\examples\

The following examples are included:

  • bin_drop.py Class to show how to handle drop events in the bin view.

  • conform_rules.py Class to show how to add additional conform rules to the Match Media process.

  • conformer_options.py conformer_options.py - Shows how to set options for the Conform (Match Media) and Import Folder dialog. (for creating custom conform rules, see also conform_rules.py).

  • create_example.py Shows how to create a new project, add clips, and create a sequence.

  • custom_guides.py Example shows how you can add custom viewer guides and masks via Python. If you wish for this code to be run on startup, copy it to your ~/.nuke directory. Note: Hiero and Nuke use the same viewer guides and masks list.

  • custom_soft_effect.py custom_soft_effect.py - Example of registering a custom Soft Effect.

  • custom_spreadsheet.py Adds custom spreadsheet columns and right-click menu for setting the Shot Status, and Artist Shot Assignement.

  • custom_transcode.py Example of a custom transcoder.

  • custom_transcode_ui.py Example of the user interface for a custom transcoder (goes with the custom_transcode.py code).

  • foundrySG_Example.py An example Hiero/Shotgun Python API integration.

  • keyboard_shortcuts.py This example shows how you can add custom keyboard shortcuts to Hiero. If you wish for this code to be run on startup, copy it to your ~/.nuke/Python/Startup directory.

  • localization_helpers.py Localization Helper Functions. These methods allow you to Localize Clips on Bins, Shots, Tracks and Sequences.

  • localization_panel.zip Adds a custom management and status panel for the localization process.

  • multi_export.py An example which shows how to spawn multiple exports from a Sequence from right-click menu in the Project Bin.

  • naming_example.py Example for how to override hiero naming scheme. Copyright (c) 2012 The Foundry Visionmongers Ltd. All Rights Reserved. . The following example provides a set of functions for extracting clip, name and root names from a clip. The example aims to read a specific (hypothetical) convention for DPX files, in which filepaths look like:. . …/longpath/shotname/version_01/001.dpx. . The current implementation of Hiero fails to retrieve a useful name for the clip due to the obscure naming convention. followed, so we would like to extract something like:. . Clip: shotname_v01. Version: shotname_v01. Root: shotname. . Notes:. - “Root” is the object which groups together several versions. - Clip and Version will often receive the same name, but we might want them to be different. For instance, we could. hide version information from clips. - When Root and Version information is displayed together in the application, the string “Root > Version” is usually. used. Note that if they share the start of the name, it will be omitted for version, e.g. “shotname > v01”.

  • new_sequence_from_selection.py Context menu option to create new sequences from selected Clips in the Bin View. If Clips are named as Stereo left and right then one sequence will be created with left and right tagged tracks.

  • nuke_write.py An example of creating a nuke (*.nk) script and using Nuke to render it.

  • paste_event_example.py Example showing how paste events work.

  • playback_events_statusbar.py Shows how to use the Playback Started/Stopped events and adds a simple message to the MainWindow Status Bar.

  • project_events.py Shows how to use hiero.core.events to register callbacks for startup, shutdown and various project event types. See help on hiero.core.events.registerInterest and hiero.core.events.unregisterInterest for more details.

  • rush_render_auto_submit.py Example to submit a Transcode render to a Rush render farm, automatically start the render, and open IRush.

  • rush_render_start_irush.py Example to submit a Transcode render to a Rush render farm.

  • spreadsheet_csv_export.py This Example shows how to register a custom menu to the Spreadsheet View and exports the contents of the Spreadsheet as a CSV file. Usage: Right-click on a row of the Spreadsheet, select Export > Spreadsheet to .CSV. Note: The ‘Action’ column is not currently hooked up and it does not currently take ‘Drop Frame’ into account.

  • versioning_example.py Example for how to override hiero versioning.

  • web_browser.py An example of creating a dockable panel from Python. This script creates a simple PySide2 Qt web browser.