On 15/05/2017 at 08:50, xxxxxxxx wrote:
Hi,
I'm new to python development into C4D.
I am developing some pipeline tools that 'communicate' with different 3d apps (Maya, Houdini, C4D, etc.). Basically, it's an external application (python, PySide), and it does communicate with 3d apps to ask them to perform some commands. (IE: Open scene/document, Import specific file, exports file, save document etc.)
I am using OSC modules to communicate from my PySide apps to C4D.
https://wiki.labomedia.org/index.php/Envoyer_et_recevoir_de_l'OSC_en_python
I am having a problem when trying to export alembic files using R18 (R18.041), while it does work fine with R17.
I am suspecting that, when using OSC modules to perform my action, it does uses a different thread then C4D's main thread? (Is it possible, how can I test?) And with that example, it seems I cant export alembic file using different thread?
https://plugincafe.maxon.net/topic/425/13566_r18-export-alembic-thread-error
Basically, from withing C4D:
print documents.SaveDocument(doc, 'C: ext.abc', c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, 1028082)
return true, and it does export and alembic file.
While using OSC, C4D does listen to a specific commands (IE: Export ABC), I will execute the same command:
print documents.SaveDocument(doc, 'C: ext.abc', c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, 1028082)
Will also return True, but doesn't export anything.
Is there a way I can query the current thread that C4D uses? Can I force my execution tu uses main C4D thread?
Does someone out there uses an other way than OSC to communicate with C4D and execute python commands?
Does it work exporting alembic files?
again... same codes work very well in R17, but doesnt in R18.
thanks
Jonathan