diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_render.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index e1066e1bea9..034782cc818 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -43,6 +43,7 @@ #include "RE_engine.h" #include "RE_pipeline.h" +#include "ED_render.h" /* Deprecated, only provided for API compatibility. */ EnumPropertyItem rna_enum_render_pass_type_items[] = { @@ -278,7 +279,7 @@ static void engine_update_render_passes(RenderEngine *engine, struct Scene *scen /* RenderEngine registration */ -static void rna_RenderEngine_unregister(Main *UNUSED(bmain), StructRNA *type) +static void rna_RenderEngine_unregister(Main *bmain, StructRNA *type) { RenderEngineType *et = RNA_struct_blender_type_get(type); @@ -288,6 +289,9 @@ static void rna_RenderEngine_unregister(Main *UNUSED(bmain), StructRNA *type) RNA_struct_free_extension(type, &et->ext); RNA_struct_free(&BLENDER_RNA, type); BLI_freelinkN(&R_engines, et); + + /* Stop all renders in case we were using this one. */ + ED_render_engine_changed(bmain); } static StructRNA *rna_RenderEngine_register( |