diff options
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_update.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index c5320fde0ff..0a2ca379518 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -378,6 +378,12 @@ static void scene_changed(Main *bmain, Scene *UNUSED(scene)) void ED_render_id_flush_update(Main *bmain, ID *id) { + /* this can be called from render or baking thread when a python script makes + * changes, in that case we don't want to do any editor updates, and making + * GPU changes is not possible because OpenGL only works in the main thread */ + if (!BLI_thread_is_main()) + return; + switch (GS(id->name)) { case ID_MA: material_changed(bmain, (Material *)id); |