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:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-06-24 22:10:43 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-06-25 12:10:18 +0300
commit64a584b38a73d4745e02620051592c5b05439647 (patch)
tree9d60be41bd088dc9ec9313305722bee184cdb9b4 /source/blender/blenkernel/BKE_constraint.h
parent6b53e0adbc5fee508da580bdb8feb596e36751bc (diff)
Python API: add methods to allow copying of constraints.
Blender has an operator to do Copy & Paste of constraints between objects and bones, but no simple method to do that directly via the Python API is provided. This adds a copy() method to object and pose bone constraint collections. Differential Revision: https://developer.blender.org/D8112
Diffstat (limited to 'source/blender/blenkernel/BKE_constraint.h')
-rw-r--r--source/blender/blenkernel/BKE_constraint.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h
index 8fe3bd77a26..8d7fe875c37 100644
--- a/source/blender/blenkernel/BKE_constraint.h
+++ b/source/blender/blenkernel/BKE_constraint.h
@@ -145,6 +145,11 @@ struct bConstraint *BKE_constraint_duplicate_ex(struct bConstraint *src,
const int flag,
const bool do_extern);
+struct bConstraint *BKE_constraint_copy_for_pose(struct Object *ob,
+ struct bPoseChannel *pchan,
+ struct bConstraint *src);
+struct bConstraint *BKE_constraint_copy_for_object(struct Object *ob, struct bConstraint *src);
+
void BKE_constraints_free(struct ListBase *list);
void BKE_constraints_free_ex(struct ListBase *list, bool do_id_user);
void BKE_constraints_copy(struct ListBase *dst, const struct ListBase *src, bool do_extern);