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:
authorCampbell Barton <ideasman42@gmail.com>2010-04-29 19:31:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-29 19:31:53 +0400
commit610c4befd4ea1d2798c4196785570ddce76f324a (patch)
tree0c59677e2b5fca9a0201adc56fbefb100a24c5a4 /source/blender/blenkernel/intern/constraint.c
parent6662440867f0ca909339bbb95295c8db95ba0005 (diff)
option to copy constraints without making their ID references direct links.
needed because proxies are causing libs to be linked directly when they should be kept indirect (likely slowing load times though I didnt time this)
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r--source/blender/blenkernel/intern/constraint.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 18504bab59b..a3f1cb0cb0c 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -4131,7 +4131,7 @@ static void con_extern_cb(bConstraint *con, ID **idpoin, void *userdata)
}
/* duplicate all of the constraints in a constraint stack */
-void copy_constraints (ListBase *dst, const ListBase *src)
+void copy_constraints (ListBase *dst, const ListBase *src, int do_extern)
{
bConstraint *con, *srccon;
@@ -4149,10 +4149,13 @@ void copy_constraints (ListBase *dst, const ListBase *src)
/* perform custom copying operations if needed */
if (cti->copy_data)
cti->copy_data(con, srccon);
-
- /* go over used ID-links for this constraint to ensure that they are valid for proxies */
- if (cti->id_looper)
- cti->id_looper(con, con_extern_cb, NULL);
+
+ /* for proxies we dont want to make extern */
+ if(do_extern) {
+ /* go over used ID-links for this constraint to ensure that they are valid for proxies */
+ if (cti->id_looper)
+ cti->id_looper(con, con_extern_cb, NULL);
+ }
}
}
}