Maya Previzion State ImportingWith the python script located on the Dashboard, you can now import Previzion State files into Maya. Maya will update all transforms that had been changed, and will import mattes and survey markers.
Start by moving the stateparser.py, statebuilder.py, and previzionStateTranslator.py to the plug-ins directory. C:\Program Files\Autodesk\Maya2012\bin\plug-ins.
Next, open the Script Editor(Window > General Editors > Script Editor), in a python window input this script:
This will load the plug-in, and you’ll be ready to import any Previzion state file. To load your state file, start by opening the scene file that matches your project. Then go to File > Import, and import the state.xml file from your take. Notes
- This will only function for Previzion State files created from build 7686 and on.
- Previzion states are saved on Take cut, unless the user tells Previzion not to save states. If save state on cut is disabled, a manually saved state can be used instead.
Manual ImportingFor importing transform changes into Maya with newer builds of Previzion, you’ll need access to the .xml file written in the take folder. Open up your .xml state file from the take in notepad. Do a simple replacement using Edit > Replace, and replace any ; with a space. Now you can locate your edit_ transform matrix. In Maya, select the object you want to move, and using the MEL command line at the bottom of the window, use the command xform -m with the matrix information and hit Enter.
How to Load
- Copy the .mel script into the “MEL” tab of the Script Editor (Menu Path: Window –> General Editors –> Script Editor)
- Now Execute the Script with the “execute” command
How To Use
- Press the “Locate transforms.txt” button. This will load the .txt file into memory and activate the “Apply Transform” button.
- Because of a bug in the new File Loading widget in Maya, pressing the “Load” button will ask if you want to overwrite the selected file. Disregard this warning and hit “yes.”
- The “Transform path” text field will now show the selected .txt file
- Press the “Apply Transforms” button and Voila!