Using these stubs you can have type hints and autocompletion in your Python IDE when using DaVinci Resolve Python API. No more stumbling in the dark, yay!
$ pip install fusionscript-stubs
Alternatively, drop fusionscript.pyi
somewhere your IDE will find it and adjust
your import statements accordingly.
Add this on top of your script:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from fusionscript import Resolve # ...and/or other types you want
You may then use these imported types in your code and get type hints, but they have to be quoted, for example:
def GetResolve() -> 'Resolve':
...
Happy scripting!
Patches are welcome to fix any errors in the stubs!
The stubs package major and minor version numbers (e.g. 19.0) indicate compatibility with the corresponding DaVinci Resolve version and is based on the documentation (scripting README.txt) shipped with that version. The patch version number is incremental and does not correspond to DaVinci Resolve releases.
The current stubs are based on the documentation marked as "Last Updated: 1 April 2024".