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:
Diffstat (limited to 'source/blender/blenkernel/BKE_constraint.h')
-rw-r--r--source/blender/blenkernel/BKE_constraint.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h
index e9110b99098..9c5e89bff76 100644
--- a/source/blender/blenkernel/BKE_constraint.h
+++ b/source/blender/blenkernel/BKE_constraint.h
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
@@ -30,6 +30,7 @@
#ifndef BKE_CONSTRAINT_H
#define BKE_CONSTRAINT_H
+struct ID;
struct bConstraint;
struct bConstraintTarget;
struct ListBase;
@@ -57,6 +58,11 @@ typedef struct bConstraintOb {
/* ---------------------------------------------------------------------------- */
+/* Callback format for performing operations on ID-pointers for Constraints */
+typedef void (*ConstraintIDFunc)(struct bConstraint *con, struct ID **idpoin, void *userdata);
+
+/* ....... */
+
/* Constraint Type-Info (shorthand in code = cti):
* This struct provides function pointers for runtime, so that functions can be
* written more generally (with fewer/no special exceptions for various constraints).
@@ -80,6 +86,8 @@ typedef struct bConstraintTypeInfo {
void (*free_data)(struct bConstraint *con);
/* adjust pointer to other ID-data using ID_NEW(), but not to targets (optional) */
void (*relink_data)(struct bConstraint *con);
+ /* run the provided callback function on all the ID-blocks linked to the constraint */
+ void (*id_looper)(struct bConstraint *con, ConstraintIDFunc func, void *userdata);
/* copy any special data that is allocated separately (optional) */
void (*copy_data)(struct bConstraint *con, struct bConstraint *src);
/* set settings for data that will be used for bConstraint.data (memory already allocated using MEM_callocN) */
@@ -116,6 +124,7 @@ void unique_constraint_name(struct bConstraint *con, struct ListBase *list);
void free_constraints(struct ListBase *list);
void copy_constraints(struct ListBase *dst, const struct ListBase *src);
void relink_constraints(struct ListBase *list);
+void id_loop_constraints(struct ListBase *list, ConstraintIDFunc func, void *userdata);
void free_constraint_data(struct bConstraint *con);
/* Constraint API function prototypes */
@@ -127,6 +136,7 @@ struct bConstraint *add_pose_constraint(struct Object *ob, struct bPoseChannel *
int remove_constraint(ListBase *list, struct bConstraint *con);
int remove_constraint_index(ListBase *list, int index);
+void remove_constraints_type(ListBase *list, short type, short last_only);
/* Constraints + Proxies function prototypes */
void extract_proxylocal_constraints(struct ListBase *dst, struct ListBase *src);