Re: [Maya-Python] how to get the return value with MGlobal::executePythonCommandStringResult

2023-04-30 Thread Justin Israel
On Mon, May 1, 2023 at 10:15 AM Rudi Hammad wrote: > I spent 2 hours looking into this and you solved it in 2 minutes XD. I > looked into that documentation definition before, but I didn't understand > as you did what was going on. > All good now.(In cpp bootstrap is MString type). > Thanks

Re: [Maya-Python] how to get the return value with MGlobal::executePythonCommandStringResult

2023-04-30 Thread Rudi Hammad
I spent 2 hours looking into this and you solved it in 2 minutes XD. I looked into that documentation definition before, but I didn't understand as you did what was going on. All good now.(In cpp bootstrap is MString type). Thanks Justin. El domingo, 30 de abril de 2023 a las 23:14:38 UTC+2,

Re: [Maya-Python] how to get the return value with MGlobal::executePythonCommandStringResult

2023-04-30 Thread Justin Israel
"Executes a Python command that returns a string result from the command engine" Given the documentation, executePythonCommandStringResult wants to parse the python statement through its own command engine. It kind of assumes that the statement sent to this particular function is a single command

[Maya-Python] how to get the return value with MGlobal::executePythonCommandStringResult

2023-04-30 Thread Rudi Hammad
Hi, I am writing a Plugin in C++ and I am having trouble figuring out how to get a return from python execute code. For instance, this works perfectly: MString pyCommand2; pyCommand2 = "cmds.joint()"; auto test2 = MGlobal::executePythonCommandStringResult(pyCommand2);