META

Ramses Maya Add-on

Ramses comes with an official add-on for Autodesk Maya, which actually consists in a Python plug-in and a custom shelf packaged in a simple single module.

It is an example of an implementation of an add-on using the Ramses Python API but it is already well suited for use in production.

As well as all other Ramses Add-ons, the Ramses Maya Add-on includes the main features like versionning, publishing and production tracking with Ramses, but it can be extended to automate your workflow.

This Add-on can be used with or without being connected to the Ramses Daemon (and the Ramses Client Application). If it is connected to the Daemon, it will automatically update the production tracking data.

Installation

This is how the content of this file looks like:

+ Ramses 0.0.1-dev D:\your\path\to\the\module
PYTHONPATH+:=plug-ins
MAYA_SHELF_PATH+:=shelves

Do not change anything else in the file.

Plugin manager

Known Issues

There’s an issue with the Maya Batch Render method where any module adding its own shelf prevents the Batch Render to be processed (as explained here).

There are several workarounds:

Features

All features of the Ramses add-on are available through the new shelf and a marking menu tied to [Ctrl] + [Alt] + [Middle Click]. They are also registered as Mel and Python Maya commands. All these features are detailed in the next sections.

To handle all file naming and sorting, Ramses includes commands to replace all the default Save, Save As and Open functions. Using (almost) only the Ramses commands ensures your files will always be correctly named and in the right location. It also helps Ramses track the production.

Feature Maya Command Description
Open the Ramses App ramOpenRamses Launches the Ramses Client Application (if its path is correctly set in the settings).
Save ramSave Saves and backups the current scene; this save command is also used for production tracking.
Comment ramSave Associates a comment wit the current scene file.
Incremental Save ramSaveVersion Saves and increments the version of the current scene.
Update Status / Publish ramSaveVersion Saves and increments the version of the current scene, while updating its current production tracking status. Optionally publishes the asset/shot.
Create Preview ramPreview Creates a preview (thumbnail or playblast) of the current scene.
Save as ramSaveAs Saves the scene as a new Asset, Shot or General item.
Template ramPublishTemplate Saves the current scene as a new template for the current step.
Setup scene ramSetupScene Setups the scene to make it Ramses-friendly.
Open ramOpen Opens an Asset, Shot or Template.
Import ramOpen Imports an Asset, Shot or Template.
Replace ramOpen Replaces selected nodes with another Asset, Shot or Template.
Update ramUpdate Updates assets and shots included in the scene.
Retrieve Version ramRetrieveVersion Retrieves and restores a previous version of the current scene.
Publish settings ramPublishSettings Sets the default publish settings for steps.
Settings ramSettings Opens the settings dialog for the Ramses Add-on.

Save

The Ramses Save command starts by saving the current scene, and then runs a few checks before backuping the file into the _versions subfolder:

Depending on these checks, Ramses will automatically associate a comment with the corresponding version to warn of any changes.

The Mel and Python corresponding command is: ramSave. It can take two parameters:

# Python
import maya.cmds as cmds

# Save the current file
cmds.ramSave()

# Save the file with a comment (show the comment dialog)
cmds.ramSave(set_comment = True)

# Save the file with a custom comment
cmds.ramSave(sc = True, comment = "A new comment!")

Comment

The Comment command saves the current scene the same way as the Save command, and adds a comment associated with the current version.

This comment is displayed with the corresponding version in all version selection dialogs, both in the add-on itself and in the Ramses Client Application, as shown below.

A list of versions with a few comments, as shown in the Ramses Maya Add-on.
A list of versions with a few comments, as shown in the Ramses Client Application.

The Mel and Python corresponding command is: ramSave with its two parameters -sc and c. Read the Save section for details.

# Python
import maya.cmds as cmds
# Save the file with a custom comment
cmds.ramSave(sc = True, comment = "A new comment!")

Incremental Save

The Incremental Save runs the save command and forces it to increment to a new version.

The Mel and Python corresponding command is: ramSaveVersion with the parameter updateStatus set to False. Read the Update Status section for details.

# Python
import maya.cmds as cmds
# Incremental save
cmds.ramSaveVersion( updateStatus=False )

Update Status and Publish

The Update Status runs the Incremental Save command and updates the current production status of the current Asset or Shot.

A dialog is shown with a few options to update the status, and to choose to also publish the scene, and create a preview for it. This dialog may differ depending on the use of the Ramses Client Application or not.

This is the status dialog when connected to the Ramses Client Application.

All this information is automatically fed to the Ramses Daemon which updates the information for everyone.

This is the status dialog when the Ramses Client Application isn't available.

The Update Status and Save button updates the status, publishes the scene, and creates the preview, while the Skip and Just Save button just increments the version and saves.

The Mel and Python corresponding command is: ramSaveVersion. It can take three parameters:

# Python
import maya.cmds as cmds

# Shows the update status dialog
cmds.ramSaveVersion()

# Incremental save
cmds.ramSaveVersion(updateStatus = False)

# Publishes the file without showing the status dialog
cmds.ramSaveVersion(publish = True, us = False)
# Publishes and creates a preview without showing the status dialog
cmds.ramSaveVersion(publish = True, preview = True, us = False)

Publish

The publication of the scene is done in several steps:

  1. If the Ramses Daemon is available, Ramses checks if there are publish settings available.
    If no settings were found, or if the user checked the box to edit the settings, a dialog window is shown to let the user adjust the publish settings.
  2. The Scene is saved in the _published subfolder. This is the folder from which the scene and published files can be imported or referenced into other Assets and Shots.
  3. One or several files are published, according to the settings.
  4. Ramses then calls any potential publish function registered by the pipeline tools or an extension of the Add-On.

▹ Read the publishing guide for Maya for more information about the Maya pipeline.

Preview

The Preview command allows you to quickly create either an image (thumbnail) or a video (playblast) preview of the current scene, automatically saved in the _preview subfolder.

There are a few options to adjust how the image or video are rendered.

Ramses also automatically burns useful meta-data in the image, like the frame number, the focal length, the comment, etc.

The Mel and Python corresponding command is: ramPreview.

# Python
import maya.cmds as cmds

# Shows the preview dialog
cmds.ramPreview()

Playblasts

When rendering the playblasts, Ramses does not only renders them as usual Maya playblasts: you don’t need to install Quicktime on windows anymore to export videos. Ramses automatically renders the playblasts in a very lightweight MP4 video, crafted especially for reviewing animations, with an intra-frame encoding setting which enables frame by frame playblack on every video player, with great performance.

Ramses will also automatically play the video as soon as it’s encoded using ffplay, a very efficient and lightweight video player. It may seem complicated at first as it does not have any User Interface, but it is easily controlled with a few shortcuts:

Save As

The Save As command can be used to create a new Asset or Shot, or save any other new file, while automatically naming and locating it.

When selecting Other as type, the file will be saved in the main folder of the corresponding step. Read the section about the Ramses Tree for more information.

The Mel and Python corresponding command is: ramSaveAs.

# Python
import maya.cmds as cmds

# Shows the save as dialog
cmds.ramSaveAs()

Template

Use the Template command to create a new template file to be used with a specific step.

Use the Name to have several templates for the same step.

Hint

This command just creates the new template, but does not publish it. You still have to publish it using the Update Status command afterwards.

Templates can then be used to create new scenes for specific Shots or Assets from the Ramses Client Application.
Templates are also available with the Open / Import command of the add-on.

The Mel and Python corresponding command is: ramPublishTemplate.

# Python
import maya.cmds as cmds

# Shows the publish template dialog
cmds.ramPublishTemplate()

Setup scene

The Setup scene command runs some checks on the current scene and makes sure everything works according to the current project.

Ramses will automatically add the Ramses_Publish and Ramses_DelOnPublish sets if they’re missing, and checks these values to optionally fix them:

These checks are automatically run when the scene is saved.

The Mel and Python corresponding command is: ramSetupScene.

# Python
import maya.cmds as cmds

# Checks the scene settings and shows a dialog if something is wrong
cmds.ramSetupScene()

Open, Import, Replace

The Open and Import command automatically finds available scenes from your projects.

It is not needed to go down all the hierarchy to select a file to open; if you just select an item and a step, Ramses will automatically open or import the corresponding latest version of the main resource. It works the same way when importing items: you don’t need to go all the way down to select the files you want to import; by selecting just the main file, Ramses will import everything available, or, if you’re using an extension of the Add-on, it will pass all the files to the extension so it can automatically manage the import for you.

When importing an item, Ramses will also trigger custom import scripts registered by the pipeline tools or an extension of the Maya Add-on. This is one way of automating your workflow, by just registering scripts to be called when publishing and importing items.

The Mel and Python corresponding command is: ramOpen. It can take two parameters:

# Python
import maya.cmds as cmds

# Shows the open dialog
cmds.ramOpen()

# Shows the import dialog
cmds.ramOpen(i=true)

# Shows the replace dialog
cmds.ramOpen(r=true)

When importing or replacing items, you can change how the different versions are sorted using the Edit menu.

Update

Use the Update command to update (or downgrade) the assets included in the scene.

For each asset, you can select which version to use in the scene and automatically replace it. The update command is able to update to a newer or downgrade to a previous version.

The Mel and Python corresponding command is: ramUpdate. It can take two parameters:

# Python
import maya.cmds as cmds

# Shows the update dialog
cmds.ramUpdate()

# Updates all the items in the current scene
cmds.ramUpdate( a=True )

# Updates the selected items in the current scene
cmds.ramUpdate( s=True )

Retrieve Version

The Retrieve version command can be used to check and restore a previous version of the current scene.

The Mel and Python corresponding command is: ramRetrieveVersion.

# Python
import maya.cmds as cmds

# Shows the retrieve version dialog
cmds.ramRetrieveVersion()

Publish Settings

▹ Read the publishing guide for Maya for more information about the Maya pipeline.

Settings

Versionning

Folders

Ramses Application

Development