Give me Python selection - hiero.selectedItems v1.3


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Antony Nasce
Easy way to get selected items for use in your Script Editor. Stores them in hiero.selectedItems. Uses Ctrl/Cmd+Alt+C Shortcut.
Requirements:
7.0 or later
18 Nov 2013
646

Sometimes you just want to get the items in your view, to play with in the Script Editor.

This python, provides an easy way to get selected items for use in your Script Editor. Stores them in hiero.selectedItems. Ctrl/Cmd+Alt+C Shortcut.

By default this will return: Projects, Clips, Sequences, Bins, Tracks, TrackItems

To install, copy to: ~/.hiero/Python/Startup

The example adds a right-click Menu to the Timeline, Spreadsheet and and Bin Views for getting the current Selection.

After running this action, the selection is stored in: hiero.selectedItems , which can be used in the Script Editor.

A keyboard shortcut is also added: Ctrl/Cmd+Alt+C.

Note on activeItem behaviour in BinView

By default in the Bin, the action will return the activeItem, i.e. the Clip or Sequence, rather than the BinItem.

This behaviour can be overridden by changing this line:

kAlwaysReturnActiveItem = True

to: kAlwaysReturnActiveItem = False

or can be set dynamically in the Hiero session Editor via:

hiero.plugins.getPythonSelection.SelectedShotAction.kAlwaysReturnActiveItem = False

 

Please login in order to download these files.

You have no rights to post comments

We have 3082 guests and 132 members online