Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-31 12:49:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-31 12:49:52 +0400
commitd7dd2154a1e2359b9bf5cb66c5c97507f2d7a501 (patch)
tree784e57de073d906a97734604a8e41c60a274177d /source
parent278e2bc3a4a60eb2667954129dc8cbd51267209b (diff)
fix for issue #2 in report: [#26695] Two fail cases with modifiers targeting linked assets
also fix for scene.objects.link() not setting library data as being directly used.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c7
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
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;