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
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2017-06-14 23:36:30 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-06-14 23:38:11 +0300
commiteeb9e5316a615f0e5052b28eee4966c4e2ed1152 (patch)
tree920a10f887c5249bcf34ddb54180092d8ef0a98e /source/blender/blenkernel/intern/object.c
parent31437b0d4de01dbd8986cb97a019079e473b397f (diff)
Make whole ID copying code use const source pointer.
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index b65cc408ae5..f3086396c3a 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -882,7 +882,7 @@ SoftBody *copy_softbody(const SoftBody *sb, bool copy_caches)
return sbn;
}
-BulletSoftBody *copy_bulletsoftbody(BulletSoftBody *bsb)
+BulletSoftBody *copy_bulletsoftbody(const BulletSoftBody *bsb)
{
BulletSoftBody *bsbn;
@@ -1014,7 +1014,7 @@ void BKE_object_copy_softbody(Object *ob_dst, const Object *ob_src)
}
}
-static void copy_object_pose(Object *obn, Object *ob)
+static void copy_object_pose(Object *obn, const Object *ob)
{
bPoseChannel *chan;
@@ -1047,7 +1047,7 @@ static void copy_object_pose(Object *obn, Object *ob)
}
}
-static void copy_object_lod(Object *obn, Object *ob)
+static void copy_object_lod(Object *obn, const Object *ob)
{
BLI_duplicatelist(&obn->lodlevels, &ob->lodlevels);
@@ -1098,7 +1098,7 @@ void BKE_object_transform_copy(Object *ob_tar, const Object *ob_src)
copy_v3_v3(ob_tar->size, ob_src->size);
}
-Object *BKE_object_copy_ex(Main *bmain, Object *ob, bool copy_caches)
+Object *BKE_object_copy_ex(Main *bmain, const Object *ob, bool copy_caches)
{
Object *obn;
ModifierData *md;
@@ -1187,7 +1187,7 @@ Object *BKE_object_copy_ex(Main *bmain, Object *ob, bool copy_caches)
}
/* copy objects, will re-initialize cached simulation data */
-Object *BKE_object_copy(Main *bmain, Object *ob)
+Object *BKE_object_copy(Main *bmain, const Object *ob)
{
return BKE_object_copy_ex(bmain, ob, false);
}