diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 140a4b435be..c4a5e4966d3 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -437,9 +437,12 @@ static void modifier_object_set(Object *self, Object **ob_p, int type, PointerRN { Object *ob= value.data; - if(!self || ob != self) - if(!ob || type == OB_EMPTY || ob->type == type) + if(!self || ob != self) { + if(!ob || type == OB_EMPTY || ob->type == type) { + id_lib_extern((ID *)ob); *ob_p= ob; + } + } } static void rna_LatticeModifier_object_set(PointerRNA *ptr, PointerRNA value) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index e00ceeafd99..92a2828495e 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -222,7 +222,7 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report } base= scene_add_base(scene, ob); - ob->id.us++; + id_us_plus(&ob->id); /* this is similar to what object_add_type and add_object do */ base->lay= scene->lay; |