I am having trouble capturing the return value of a Python Script called from a C++ Plugin.
I am trying to capture a MStringArray from the Python Script, but I only get an empty value. The Python is running and completing - however the result is still MStatus.kFailure - which explains why the return value is not getting sent back to C++…
I know the python script is running all the way up to the return statement because of the print statements, but for some reason, Maya thinks the Python Command failed.
edit: seems like i am not the only one to hit this problem - here is the same question dating back to 2009…
https://www.creativecrash.com/forums/api/topics/mglobal-executepythoncommand