Actions (using external Python files)¶
Contents of this page:
Overview¶
Python scripts can be used to generate and display text tailored to the situation
This example shows how to output action information in combination with the
Actions
Attribute of the RenderOverride node
Project file¶
This is the finished scene of this project (saved in Maya®2022)
Process¶
1. Actions Attribute Settings¶
Add information to the
Actions
attribute
2. Preparing Python Scripts¶
This time, we will use the
actions.py
provided by the pluginThe Python files are installed in
C:/ProgramData/Autodesk/ApplicationPlugins/RenderOverride/Contents/plug-ins/[OS-MAYA VERSION]/python/actions/
.The
PYTHONPATH
is passed when RenderOverride is loaded, so you can use it right away.(If you want to run your own Python code, it is recommended that you use
PYTHONPATH
or similar to pass it through.)
3. Setting Text Attributes¶
Check
Enable
of Text.Set
Generate Type
of Text to Python.Enter the following code in the
Text String
Attributeimport actions;actions.actions_text()
You can also enter code by right-clicking on the text box and selecting
Python: Actions
.
4. Check display¶
Play the timeline, and if the display changes to look like the text in the upper right corner of the next video, you have succeeded.
See also