python.tk_houdini.utils.action_manager
¶
Module Contents¶
Classes¶
A shotgun workfiles action manager class for houdini. |
-
class
HoudiniActionManager
(handler, node)[source]¶ Bases:
sgtk.platform.qt.QtCore.QObject
A shotgun workfiles action manager class for houdini.
-
_on_open
(self, sg_data, policy=None)[source]¶ Callback to run on open of an object. Populate the node from the publish data.
Emits on_action_triggered event.
- Parameters
sg_data (dict) – The publish data to load.
policy – The version policy to apply.
-
get_actions_for_folder
(self, sg_data)[source]¶ Returns a list of actions for a folder object. Overrides the base implementation as we don’t want any folder actions presented in the open dialog.
- Parameters
sg_data – The data associated with this folder
- Returns
A list of actions that are available for this folder
-
get_actions_for_publish
(self, sg_data, ui_area)[source]¶ See documentation for
get_actions_for_publishes()
. The functionality is the same, but only for a single publish.- Parameters
sg_data (dict) – Standard Shotgun entity dictionary with keys type, id and name.
ui_area – Indicates which part of the UI the request is coming from. Currently one of UI_AREA_MAIN, UI_AREA_DETAILS and UI_AREA_HISTORY`.
- Returns
A
list
of QAction instances.
-
get_actions_for_publishes
(self, sg_data, ui_area)[source]¶ Returns a list of actions for a list of publishes. Returns nothing because we don’t want any regular actions presented in the open dialog.
- Parameters
sg_data – Shotgun data for a publish
ui_area – Indicates which part of the UI the request is coming from. Currently one of UI_AREA_MAIN, UI_AREA_DETAILS and UI_AREA_HISTORY
- Returns
List of QAction objects, ready to be parented to some QT Widgetry.
-
get_default_action_for_publish
(self, sg_data, ui_area)[source]¶ Get the default action for the specified publish data.
For the open dialog, the default action is to open the publish the action is triggered for.
- Parameters
sg_data – Shotgun data for a publish
ui_area – Indicates which part of the UI the request is coming from. Currently one of UI_AREA_MAIN, UI_AREA_DETAILS and UI_AREA_HISTORY
- Returns
The QAction object representing the default action for this publish
-
has_actions
(self, publish_type)[source]¶ Returns true if the given publish type has any actions associated with it. For the open dialog, this returns true if the file can be opened (is one of the valid publish types the action manager was initialised with).
Is only valid if the settings have been set up accordingly.
- Parameters
publish_type – A Shotgun publish type (e.g. ‘Maya Render’)
- Returns
True if the current actions setup knows how to handle this.
-