PyFlame_
v5.3.1 · FLAME 2025.1+ · PYTHON 3.11 · PYSIDE6
A Python library for Autodesk Flame.
PyFlame is a Python library containing a set of custom Qt widgets for Autodesk Flame — all styled to match Flame's native UI — along with layout helpers, window classes, a config system, and utility functions for script development.
The library file should be renamed per-script to pyflame_lib_<script_name>.py and placed in the script's lib/ folder, avoiding version conflicts when multiple scripts coexist in the Flame Python folder. It requires the Montserrat font family (included in assets/fonts/) to render correctly. These fonts are included in the PyFlame library.
| Flame Version | 2025.1+ |
| Python Version | 3.11 |
| Qt Binding | PySide6 |
| Platform | Rocky Linux · MacOS |
| Version | 5.3.0 · Updated 03.13.26 |
| Licence | GNU General Public License v3.0 (GPL-3.0) |
All scripts using PyFlame must follow this layout. Rename the library file per-script to avoid conflicts when multiple scripts are installed simultaneously.
The script folder, script name, and library file name must all be the same.
Folder structure:
├── main_script.py
├── lib/
│ └── pyflame_lib_<script_name>.py
│ └── README.md # optional
│ └── CHANGELOG.md # optional
└── assets/
└── fonts/
└── Montserrat-Regular.ttf
└── Montserrat-Light.ttf
└── Montserrat-Thin.ttf
Example folder structure for script named "rename_shots":
├── rename_shots.py
├── lib/
│ └── pyflame_lib_rename_shots.py
│ └── README.md # optional
│ └── CHANGELOG.md # optional
└── assets/
└── fonts/
└── Montserrat-Regular.ttf
└── Montserrat-Light.ttf
└── Montserrat-Thin.ttf
Import everything from the library into the script's namespace. Use PyFlameFunctions via the pyflame object and instantiate widgets directly by class name.
from lib.pyflame_lib_my_script import *
# Use PyFlameFunctions via the pyflame object
pyflame.print("Script loaded")
flame_version = pyflame.get_flame_version()
# Instantiate widgets directly
window = PyFlameWindow(title='My Script', width=500, height=400)
button = PyFlamePushButton(text='Run', connect=my_function)
menu = PyFlameMenu(text='Options', menu_options=['A', 'B', 'C'])
window.show()
Click any widget to see its description, parameters, and a usage example.
All utility functions are accessed through the pyflame object after importing the library.