How to expose C++ symbols to Python users as a third party?
-
@ferdinand said in how to use the commands from Octane/Redshift's symbols.h:
Hey @RTF,
Thank you for reaching out to us. There is no fully automatic way to do this, as it is up to third parties to expose their APIs to Python. When a vendor does not offer a Python API, you can do two things:
- Simply define the symbols yourself in your Python code, they are just integer values after all.
- With mxutils.ImportSymbols you can import symbols from a resource, e.g., a
symbols.h
file. It is (a part of) the very mechanism we use to automatically expose the symbols from the native Cinema 4D C++ API to the Python API.
Cheers,
FerdinandJust to piggyback on this. "it is up to third parties to expose their APIs to Python" How would we at Octane expose the symbols in our c4d_symbol.h?
I found this page: https://developers.maxon.net/docs/py/2024_0_0a/manuals/manual_py_symbols.html
But it doesnt specify how to do this from our end in C++?
Atm we are only able expose certain NodeData headers files in our resource folder. -
This post is deleted! -
Hi just to let you know I will answers you next week Monday.
Cheers,
Maxime.