diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 1 |
4 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 6dac2e27f9c..860ed5e49ab 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -412,6 +412,7 @@ static void rna_Constraint_followTrack_camera_set(PointerRNA *ptr, PointerRNA va if (ob) { if (ob->type == OB_CAMERA && ob != (Object *)ptr->id.data) { data->camera = ob; + id_lib_extern((ID *)ob); } } else { @@ -428,6 +429,7 @@ static void rna_Constraint_followTrack_depthObject_set(PointerRNA *ptr, PointerR if (ob) { if (ob->type == OB_MESH && ob != (Object *)ptr->id.data) { data->depth_ob = ob; + id_lib_extern((ID *)ob); } } else { @@ -457,6 +459,7 @@ static void rna_Constraint_objectSolver_camera_set(PointerRNA *ptr, PointerRNA v if (ob) { if (ob->type == OB_CAMERA && ob != (Object *)ptr->id.data) { data->camera = ob; + id_lib_extern((ID *)ob); } } else { diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index e1e9fc1cf68..65175e37518 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -385,6 +385,7 @@ static void rna_Curve_bevelObject_set(PointerRNA *ptr, PointerRNA value) /* set as bevobj, there could be infinity loop in displist calculation */ if (ob->type == OB_CURVE && ob->data != cu) { cu->bevobj = ob; + id_lib_extern((ID *)ob); } } else { @@ -427,6 +428,7 @@ static void rna_Curve_taperObject_set(PointerRNA *ptr, PointerRNA value) /* set as bevobj, there could be infinity loop in displist calculation */ if (ob->type == OB_CURVE && ob->data != cu) { cu->taperobj = ob; + id_lib_extern((ID *)ob); } } else { diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 27c4bf0e985..9bddb6c06de 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -549,9 +549,11 @@ RNA_MOD_OBJECT_SET(Shrinkwrap, auxTarget, OB_MESH); static void rna_HookModifier_object_set(PointerRNA *ptr, PointerRNA value) { HookModifierData *hmd = ptr->data; + Object *ob = (Object *)value.data; - hmd->object = (Object *)value.data; - BKE_object_modifier_hook_reset((Object *)ptr->id.data, hmd); + hmd->object = ob; + id_lib_extern((ID *)ob); + BKE_object_modifier_hook_reset(ob, hmd); } static PointerRNA rna_UVProjector_object_get(PointerRNA *ptr) @@ -562,8 +564,10 @@ static PointerRNA rna_UVProjector_object_get(PointerRNA *ptr) static void rna_UVProjector_object_set(PointerRNA *ptr, PointerRNA value) { - Object **ob = (Object **)ptr->data; - *ob = value.data; + Object **ob_p = (Object **)ptr->data; + Object *ob = (Object *)value.data; + id_lib_extern((ID *)ob); + *ob_p = ob; } #undef RNA_MOD_OBJECT_SET diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index f295ee4e0af..5fb6fa19fda 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -554,6 +554,7 @@ static void rna_Scene_set_set(PointerRNA *ptr, PointerRNA value) return; } + id_lib_extern((ID *)set); scene->set = set; } |