maya.constructs

Maya constructs and high-level utilities.

Submodules

Classes

Panel

Construct for managing a torn-off model panel and associated camera settings.

Package Contents

class Panel(camera: str | maya.types.camera.Camera | maya.types.transform.Transform, resolution: Tuple[int, int] = (1920, 1080), inherit: bool = True, title: str = 'Tik Panel')

Construct for managing a torn-off model panel and associated camera settings.

This construct creates a floating window with a model panel and manages both the panel’s display options and the camera’s display attributes. It supports reverting the camera to its original state upon destruction.

activate()

Make the panel the active panel.

close()

Close the panel window and revert camera settings.

fit_view(**kwargs)

Frame all objects in the panel.

get_editor_var(flag: str) Any

Get a modelEditor flag value.

Args:

flag: The modelEditor flag name.

Returns:

The current value of the flag, or None if panel doesn’t exist.

revert()

Revert camera settings to their original state.

set_editor_var(flag: str, value: Any)

Set a modelEditor flag value.

Args:

flag: The modelEditor flag name. value: The value to set.

set_preset(preset: str)

Apply a predefined preset of settings.

Args:

preset: Name of the preset (e.g., ‘preview’).

CAMERA_ATTRS = ['displayFieldChart', 'displayGateMask', 'displayFilmGate', 'displayFilmOrigin',...
MODEL_EDITOR_FLAGS = ['activeComponentsXray', 'activeCustomGeometry', 'activeCustomLighSet',...
property all_objects: bool

Whether to display all object types.

property camera

The camera associated with this panel.

property color_management_enabled: bool

Whether color management is enabled.

property display_appearance: str

Display appearance mode (e.g., ‘wireframe’, ‘smoothShaded’).

property display_field_chart: bool

Whether to display the field chart in the camera view.

property display_film_gate: bool

Whether to display the film gate.

property display_film_origin: bool

Whether to display the film origin.

property display_film_pivot: bool

Whether to display the film pivot.

property display_gate_mask: bool

Whether to display the gate mask.

property display_resolution: bool

Whether to display the resolution gate.

property display_safe_action: bool

Whether to display the safe action area.

property display_safe_title: bool

Whether to display the safe title area.

property display_textures: bool

Whether to display textures.

property grid: bool

Whether to display the grid.

property hud: bool

Whether to display the heads-up display.

property image_plane: bool

Whether to display image planes.

property isolate

Return a PanelIsolate helper for managing isolation mode.

property joints: bool

Whether to display joints.

property locators: bool

Whether to display locators.

property manipulators: bool

Whether to display manipulators.

property name: str | None

Return the model panel name.

property nurbs_curves: bool

Whether to display NURBS curves.

property nurbs_surfaces: bool

Whether to display NURBS surfaces.

property overscan: float

The camera overscan value.

property pivots: bool

Whether to display pivots.

property polymeshes: bool

Whether to display polygon meshes.

property selection_highlighting: bool

Whether to highlight selected objects.

property use_default_material: bool

Whether to display objects with default material.