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); render_engine_flag_changed(bmain, RE_ENGINE_UPDATE_MA); break; case ID_TE: texture_changed(bmain, (Tex *)id); break; case ID_WO: world_changed(bmain, (World *)id); break; case ID_LA: lamp_changed(bmain, (Lamp *)id); break; case ID_IM: image_changed(bmain, (Image *)id); break; case ID_SCE: scene_changed(bmain, (Scene *)id); render_engine_flag_changed(bmain, RE_ENGINE_UPDATE_OTHER); break; default: render_engine_flag_changed(bmain, RE_ENGINE_UPDATE_OTHER); break; } }
void ED_render_id_flush_update(Main *bmain, ID *id) { switch (GS(id->name)) { case ID_MA: material_changed(bmain, (Material *)id); break; case ID_TE: texture_changed(bmain, (Tex *)id); break; case ID_WO: world_changed(bmain, (World *)id); break; case ID_LA: lamp_changed(bmain, (Lamp *)id); break; case ID_IM: image_changed(bmain, (Image *)id); break; case ID_SCE: scene_changed(bmain, (Scene *)id); break; default: break; } }