Skip to content

Fxdcc

DCC (Digital Content Creation) utility functions for fxgui.

This module provides utility functions for integrating fxgui with various DCC applications including Houdini, Maya, and Nuke. It handles the detection of the current DCC environment and provides access to their main windows and stylesheets.

Constants

STANDALONE: Constant indicating standalone Python mode. HOUDINI: Constant indicating Houdini environment. MAYA: Constant indicating Maya environment. NUKE: Constant indicating Nuke environment.

Functions:

Name Description
get_dcc_main_window

Auto-detect and return the current DCC main window.

get_houdini_main_window

Get the Houdini main window.

get_houdini_stylesheet

Get the Houdini stylesheet.

get_maya_main_window

Get the Maya main window.

get_nuke_main_window

Get the Nuke main window.

Examples:

Getting the DCC main window automatically:

>>> from fxgui import fxdcc
>>> main_window = fxdcc.get_dcc_main_window()
>>> if main_window is not None:
...     my_dialog = MyDialog(parent=main_window)
...     my_dialog.show()

Explicitly getting a specific DCC window:

>>> houdini_window = fxdcc.get_houdini_main_window()
>>> maya_window = fxdcc.get_maya_main_window()

get_dcc_main_window

get_dcc_main_window() -> Optional[Any]

Import the current DCC main window.

Returns:

Type Description
Optional[Any]

Optional[Any]: The return value of the first successful function call, or None if no calls are successful.

Notes

This function is DCC agnostic and will return the main window based on the success of the DCC module import.

get_houdini_main_window

get_houdini_main_window() -> QWidget

Get the Houdini main window.

Returns:

Type Description
QWidget

qtpy.QtWidgets.QWidget: QWidget Houdini main window.

get_houdini_stylesheet

get_houdini_stylesheet() -> str

Get the Houdini stylesheet.

Returns:

Name Type Description
str str

The Houdini stylesheet.

get_maya_main_window

get_maya_main_window() -> Optional[QWidget]

Get the Maya main window.

Returns:

Type Description
Optional[QWidget]

qtpy.QtWidgets.QWidget: TmainWindow Maya main window, or None if not found.

get_nuke_main_window

get_nuke_main_window() -> Optional[QMainWindow]

Get the Nuke main window.

Returns:

Type Description
Optional[QMainWindow]

qtpy.QtWidgets.QMainWindow: DockMainWindow Nuke main window, or None if not found.