diff options
author | Matt Ebb <matt@mke3.net> | 2010-04-26 07:42:38 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-04-26 07:42:38 +0400 |
commit | f85fe4d633a565106048f1e9511894d2539e78a6 (patch) | |
tree | 46af608051dc8cf1f93873ec4675757e207dcc5c /source/blender/blenkernel/intern/constraint.c | |
parent | 47e1f253c59c3108159732c30da89a7ad154261b (diff) |
Pass constraint names as operator properties in constraint operators
This is similar to commit revision 22078, but for constraint operators rather
than modifiers, making it possible to use them from scripting.
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 6941742a0c9..9dab2c1c07e 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -36,6 +36,7 @@ #include "MEM_guardedalloc.h" #include "BLI_blenlib.h" +#include "BLI_listbase.h" #include "BLI_math.h" #include "BLI_editVert.h" @@ -4162,6 +4163,11 @@ void copy_constraints (ListBase *dst, const ListBase *src) /* ......... */ +bConstraint *constraints_findByName(ListBase *list, const char *name) +{ + return BLI_findstring(list, name, offsetof(bConstraint, name)); +} + /* finds the 'active' constraint in a constraint stack */ bConstraint *constraints_get_active (ListBase *list) { |