scaredyfish/blender-rhubarb-lipsync

How wait until addon is finished

ilkarataev opened this issue · 1 comments

Hi, i have simple script to regenerate with new audio files, i want render all in backgroun but when i run bpy.ops.object.rhubarb_lipsync() blender closed but addon still work. If you can help me i will be very apretiate.

render lips start
render lips finish
{ "type": "progress", "value": 0.00, "log": { "level": "Trace", "message": "Progress: 0%" } }
Writing userprefs: 'C:\Users\root\AppData\Roaming\Blender Foundation\Blender\2.91\config\userpref.blend' ok
{ "type": "progress", "value": 0.01, "log": { "level": "Trace", "message": "Progress: 1%" } }
{ "type": "progress", "value": 0.02, "log": { "level": "Trace", "message": "Progress: 2%" } }
{ "type": "progress", "value": 0.03, "log": { "level": "Trace", "message": "Progress: 3%" } }
{ "type": "progress", "value": 0.04, "log": { "level": "Trace", "message": "Progress: 4%" } }
Blender quit
{ "type": "progress", "value": 0.05, "log": { "level": "Trace", "message": "Progress: 5%" } }
{ "type": "progress", "value": 0.06, "log": { "level": "Trace", "message": "Progress: 6%" } } (edited)

The operator returns "RUNNING_MODAL" when it starts, and then returns "FINISHED" when it's finished, but I'm not sure how to access that from another script.

I found this answer on blender.stackexchange which may help: https://blender.stackexchange.com/questions/143088/subscribe-to-finished-event-of-modal-operator-and-get-result-of-the-operator