From 4df0c46f838f7c316b10a6667705c093f067cadd Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 18 Apr 2013 08:58:21 +0000 Subject: Make freestyle use local Main for temporary objects This means main database is no longer pollutes with temporary scene and objects needed for freestyle render. Actually, there're few of separated temporary mains now. Ideally it's better to use single one, but it's not so much trivial to pass it to all classes. Not so big deal actually. Required some changes to blender kernel, to make it possible to add object to a given main, also to check on mesh materials for objects in given main. This is all straightforward changes. As an additional, solved issue with main database being infinitely polluted with text blocks created by create_lineset_handler function. This fixes: - #35003: Freestyle crashes if user expands objects in FRS1_Scene - #35012: ctrl+f12 rendering crashes when using Freestyle --- source/blender/makesrna/intern/rna_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_object.c') diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 0eb7ab8e581..c611e0fdd94 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -181,6 +181,7 @@ EnumPropertyItem object_axis_items[] = { #include "BKE_curve.h" #include "BKE_depsgraph.h" #include "BKE_effect.h" +#include "BKE_global.h" #include "BKE_key.h" #include "BKE_object.h" #include "BKE_material.h" @@ -396,7 +397,7 @@ static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value) } ob->data = id; - test_object_materials(id); + test_object_materials(G.main, id); if (GS(id->name) == ID_CU) BKE_curve_type_test(ob); -- cgit v1.2.3