From d96bf316ac7a1b86ee347551b05da7488e7ac65e Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Thu, 18 Mar 2010 06:03:41 +0000 Subject: [PATCH] Fix [#21657] Blender crashes after importing .obj and selecting a material Creating an object via some pre-existing obdata via the py api wasn't properly initialising the object/mesh material link data. --- source/blender/makesrna/intern/rna_main_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 56c0819680d..5f007c63b9e 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -156,6 +156,8 @@ Object *rna_Main_objects_new(Main *bmain, ReportList *reports, char* name, ID *d ob->id.us--; ob->data= data; + test_object_materials(ob->data); + return ob; }