engine module¶
A Katana engine for Shotgun Toolkit.
-
delay_until_ui_visible
(show_func)¶ Wrapper to delay showing dialogs until Katana Main UI is visible.
If it is not possible to show right now,
None
will be returned.Parameters: show_func (callable) – Show dialog method to wrap. Returns: Wrapped function Return type: callable
-
class
KatanaEngine
(*args, **kwargs)¶ Bases:
sphinx.ext.autodoc.importer._MockObject
An engine that supports Katana.
-
UI_MAINWINDOW_INVISIBLE
= 2¶
-
UI_MAINWINDOW_NONE
= 1¶
-
UI_MAINWINDOW_VISIBLE
= 3¶
-
destroy_engine
()¶
-
has_ui
¶ Whether Katana is running as a GUI/interactive session.
If it is, return the corresponding UI state enum.
Returns: Main Window state, else False if not in GUI mode. Return type: False or int
-
init_engine
()¶
-
launch_command
(cmd_id)¶
-
classmethod
main_window_ready
()¶ Whether Katana is fully started and the main window/menu is available.
Returns: Whether the main window is available. Return type: bool
-
post_app_init
()¶
-
pre_app_init
()¶ Called at startup.
-
show_dialog
(*args, **kwargs)¶ Overridden to delay showing until UI is fully initialised.
If it is not possible to show right now,
None
will be returned.Parameters: - title (str) – Title of the window. This will appear in the Toolkit title bar.
- bundle (sgtk.platform.bundle.TankBundle) – The app, engine or framework associated with this window.
- widget_class (QtWidgets.QWidget) – Class of the UI to be constructed, must subclass from QWidget.
- args (list) – Arguments for the
widget_class
constructor. - kwargs (list) – Keyword arguments for the
widget_class
constructor.
Returns: Widget of dialog shown, if any.
Return type: QtWidgets.QWidget or None
-
show_modal
(*args, **kwargs)¶ Overridden to delay showing until UI is fully initialised.
If it is not possible to show right now,
None
will be returned.Parameters: - title (str) – Title of the window. This will appear in the Toolkit title bar.
- bundle (sgtk.platform.bundle.TankBundle) – The app, engine or framework associated with this window.
- widget_class (QtWidgets.QWidget) – Class of the UI to be constructed, must subclass from QWidget.
- args (list) – Arguments for the
widget_class
constructor. - kwargs (list) – Keyword arguments for the
widget_class
constructor.
Returns: Widget of dialog shown, if any.
Return type: (int, QtWidgets.QWidget) or None
-