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:
authorJoseph Eagar <joeedh@gmail.com>2007-07-10 00:42:14 +0400
committerJoseph Eagar <joeedh@gmail.com>2007-07-10 00:42:14 +0400
commit4f01085709908e5626c735b01d6c2202236f41e6 (patch)
tree6a6213a149e55e68cc5bd5832f71bc921d884b83 /source/blender/blenkernel/intern/constraint.c
parentdfa6e0b8d66a6335e07bfdcba2bd1fc96d2a846b (diff)
=ID Property update=
ID Properties weren't being duplicated (by shift-D or any of the other duplication functions). So now ID properties are duplicated in the main copy_libblock function, which (as far as I can check) covers all ID-contained ID properties. I also updated the constraint system to copy pyconstraint ID properties on shift-D. This would probably be a good thing to add to the stable branch, btw.
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r--source/blender/blenkernel/intern/constraint.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index d5368242baf..25b8c9ac171 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -162,14 +162,21 @@ void clone_constraint_channels (ListBase *dst, ListBase *src)
void copy_constraints (ListBase *dst, ListBase *src)
{
- bConstraint *con;
+ bConstraint *con, *srccon;
dst->first= dst->last= NULL;
duplicatelist (dst, src);
- for (con = dst->first; con; con=con->next) {
+ for (con = dst->first, srccon=src->first; con; srccon=srccon->next, con=con->next) {
con->data = MEM_dupallocN (con->data);
+ if (con->type == CONSTRAINT_TYPE_PYTHON) {
+ bPythonConstraint *pycon = (bPythonConstraint*) con->data;
+ bPythonConstraint *opycon = (bPythonConstraint*) srccon->data;
+
+ pycon->prop = IDP_CopyProperty(opycon->prop);
+ }
+ /* removed a whole lot of useless code here (ton) */
}
}