maya.actions#

Various common Maya actions.

Functions:

apply_settings(*args, **kwargs)

Applies asset and bookmark item properties to the current scene.

apply_viewport_preset(k)

Applies the given viewport preset to the currently focused viewport.

capture_viewport([size])

Saves a versioned capture to the capture_folder defined in the preferences.

execute(index)

Action used to execute a selected file item.

import_camera_preset()

Import the bundled camera template to the current scene.

import_scene(path[, reference])

Imports a Maya or alembic file to the current Maya scene.

open_scene(path)

Opens the given path using cmds.file.

publish_capture(workspace, capture_folder, ...)

Publish the latest capture sequence as a version agnostic copy.

push_capture(path)

Action used to push a capture output to RV.

remove_maya_button()

Removes the maya button instance.

remove_maya_widget()

Removes the maya widget instance.

remove_workspace_control(workspace_control)

Deletes the given workspace control instance.

remove_workspace_controls()

Deletes all workspace controller instances associated with the maya plugin.

reveal_capture(path)

Action used to reveal a capture output in the file explorer.

save_scene([increment, type])

Save the current scene using our file saver.

save_warning(*args)

Shows the user a warning when a file is saved outside the current workspace.

set_workspace(*args, **kwargs)

Action used to set the Maya workspace.

show_shader_tool()

Shows the bundled shader utility tool.

unmark_active(*args)

Callback responsible for keeping the active-file in the list updated.

update_active_item(*args)

Callback responsible for keeping the active-file in the list updated.

bookmarks.maya.actions.apply_settings(*args, **kwargs)[source]#

Applies asset and bookmark item properties to the current scene.

bookmarks.maya.actions.apply_viewport_preset(k)[source]#

Applies the given viewport preset to the currently focused viewport.

Parameters

k (str) – A viewport preset key.

bookmarks.maya.actions.capture_viewport(size=1.0)[source]#

Saves a versioned capture to the capture_folder defined in the preferences.

The script will output to an image sequence and if FFMpeg can be found converts it to a h264 movie file. It will also try to create a latest folder with a copy of the last exported image sequence.

bookmarks.maya.actions.execute(index)[source]#

Action used to execute a selected file item.

bookmarks.maya.actions.import_camera_preset()[source]#

Import the bundled camera template to the current scene.

bookmarks.maya.actions.import_scene(path, reference=False)[source]#

Imports a Maya or alembic file to the current Maya scene.

Parameters
  • path (str) – Path to a Maya scene file.

  • reference (bool) – When true the import will be a reference.

bookmarks.maya.actions.open_scene(path)[source]#

Opens the given path using cmds.file.

Returns

The name of the input scene if loaded successfully.

Return type

str

Raises

RuntimeError – When an invalid scene file is encountered.

bookmarks.maya.actions.publish_capture(workspace, capture_folder, scene_info, ext)[source]#

Publish the latest capture sequence as a version agnostic copy.

bookmarks.maya.actions.push_capture(path)[source]#

Action used to push a capture output to RV.

bookmarks.maya.actions.remove_maya_button()[source]#

Removes the maya button instance.

bookmarks.maya.actions.remove_maya_widget()[source]#

Removes the maya widget instance.

bookmarks.maya.actions.remove_workspace_control(workspace_control)[source]#

Deletes the given workspace control instance.

bookmarks.maya.actions.remove_workspace_controls()[source]#

Deletes all workspace controller instances associated with the maya plugin.

bookmarks.maya.actions.reveal_capture(path)[source]#

Action used to reveal a capture output in the file explorer.

bookmarks.maya.actions.save_scene(increment=False, type='mayaAscii')[source]#

Save the current scene using our file saver.

Returns

Path to the saved scene file.

Return type

str

bookmarks.maya.actions.save_warning(*args)[source]#

Shows the user a warning when a file is saved outside the current workspace.

bookmarks.maya.actions.set_workspace(*args, **kwargs)[source]#

Action used to set the Maya workspace.

bookmarks.maya.actions.show_shader_tool()[source]#

Shows the bundled shader utility tool.

bookmarks.maya.actions.unmark_active(*args)[source]#

Callback responsible for keeping the active-file in the list updated.

bookmarks.maya.actions.update_active_item(*args)[source]#

Callback responsible for keeping the active-file in the list updated.