Embed python interpretter to access c++ runtime instance of UsdStageRefPtr in python bindings and perform post process

Hello,

I have a c++ runtime UsdstageRefPtr instance and I would like to run a python script from that same application and somehow access the equivalent python UsdStage to perform some post processing on it. PyBind seems like it will be necessary. Has anyone ever done something similiar?

Thank you!

~Evan

OpenUSD already comes with the Boost::Python bindings so you’d just need to make a function using it that returns the pointer to Python.

For reference, this is what Maya USD does maya-usd/lib/mayaUsd/python/wrapExportChaser.cpp at dev · Autodesk/maya-usd · GitHub