unreal.ShotgunEngine

class unreal.ShotgunEngine(outer=None, name='None')

Bases: unreal.Object

Wrapper for the Python Shotgun Engine The functions are implemented in Python by a class that derives from this one

C++ Source:

  • Plugin: Shotgun

  • Module: Shotgun

  • File: ShotgunEngine.h

Editor Properties: (see get_editor_property/set_editor_property)

  • selected_actors (Array(Actor)): [Read-Write] Selected Actors

  • selected_assets (Array(AssetData)): [Read-Write] Selected assets to be used for Shotgun commands

execute_command(command_name)None

Execute a Shotgun command by name in the Python Shotgun Engine

Parameters

command_name (str) –

classmethod get_instance()ShotgunEngine

Get the instance of the Python Shotgun Engine

Returns

Return type

ShotgunEngine

get_referenced_assets(actor)

Get the assets that are referenced by the given Actor

Parameters

actor (Actor) –

Returns

Return type

Array(Object)

get_selected_actors()

Selected actors to be used for Shotgun commands

Returns

Return type

Array(Actor)

get_shotgun_menu_items()

Get the available Shotgun commands from the Python Shotgun Engine

Returns

Return type

Array(ShotgunMenuItem)

classmethod get_shotgun_work_dir()str

Get the root path for the Shotgun work area

Returns

Return type

str

on_engine_initialized()None

Callback for when the Python Shotgun Engine has finished initialization

property selected_actors

[Read-Write] Selected Actors

Type

(Array(Actor))

property selected_assets

[Read-Write] Selected assets to be used for Shotgun commands

Type

(Array(AssetData))

shutdown()None

Shut down the Python Shotgun Engine