Hi,
I need a function to run after baking a normal map. I know you can do this for rendering however it doesn’t work for baking.
Any ideas?
Hi,
I need a function to run after baking a normal map. I know you can do this for rendering however it doesn’t work for baking.
Any ideas?
there are only a few callbacks (bpy.app.handlers), if you need another one, find someone to put it in the code - that’s the only way.
Ah that’s annoying I guess I can check if the file has changed instead. Ill look into it. thanks
Just a follow up in case someone finds this useful. This appears to achieve exactly what I need!
Note: I havent tested it fully though so I don’t know the limitations etc
import bpy
finished = bpy.ops.object.bake_image()
if finished:
print("Done baking")
well you don’t even need to check the return value, whatever follows an operator call will wait for the operator to finish (unless it’s a modal operator).
Downside: UI will be locked until script finishes, so you may not see the progress of baking / rendering / whatever.
I knew there must be something I was overlooking. Thanks for the explanation CoDEmanX.