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')
-rw-r--r--source/blender/blenkernel/BKE_constraint.h46
-rw-r--r--source/blender/blenkernel/intern/action.c6
-rw-r--r--source/blender/blenkernel/intern/armature.c10
-rw-r--r--source/blender/blenkernel/intern/constraint.c102
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c10
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c2
-rw-r--r--source/blender/blenkernel/intern/library_query.c4
-rw-r--r--source/blender/blenkernel/intern/object.c16
-rw-r--r--source/blender/blenkernel/intern/smoke.c2
9 files changed, 89 insertions, 109 deletions
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h
index 2aee502a71e..87da74dc119 100644
--- a/source/blender/blenkernel/BKE_constraint.h
+++ b/source/blender/blenkernel/BKE_constraint.h
@@ -108,50 +108,44 @@ typedef struct bConstraintTypeInfo {
} bConstraintTypeInfo;
/* Function Prototypes for bConstraintTypeInfo's */
-bConstraintTypeInfo *BKE_constraint_get_typeinfo(struct bConstraint *con);
-bConstraintTypeInfo *BKE_get_constraint_typeinfo(int type);
+bConstraintTypeInfo *BKE_constraint_typeinfo_get(struct bConstraint *con);
+bConstraintTypeInfo *BKE_constraint_typeinfo_from_type(int type);
-/* ---------------------------------------------------------------------------- */
-/* Useful macros for testing various common flag combinations */
-
-/* Constraint Target Macros */
-#define VALID_CONS_TARGET(ct) ((ct) && (ct->tar))
/* ---------------------------------------------------------------------------- */
/* Constraint function prototypes */
-void BKE_unique_constraint_name(struct bConstraint *con, struct ListBase *list);
+void BKE_constraint_unique_name(struct bConstraint *con, struct ListBase *list);
-void BKE_free_constraints(struct ListBase *list);
-void BKE_copy_constraints(struct ListBase *dst, const struct ListBase *src, bool do_extern);
-void BKE_relink_constraints(struct ListBase *list);
-void BKE_id_loop_constraints(struct ListBase *list, ConstraintIDFunc func, void *userdata);
-void BKE_free_constraint_data(struct bConstraint *con);
+void BKE_constraints_free(struct ListBase *list);
+void BKE_constraints_copy(struct ListBase *dst, const struct ListBase *src, bool do_extern);
+void BKE_constraints_relink(struct ListBase *list);
+void BKE_constraints_id_loop(struct ListBase *list, ConstraintIDFunc func, void *userdata);
+void BKE_constraint_free_data(struct bConstraint *con);
/* Constraint API function prototypes */
-struct bConstraint *BKE_constraints_get_active(struct ListBase *list);
-void BKE_constraints_set_active(ListBase *list, struct bConstraint *con);
-struct bConstraint *BKE_constraints_findByName(struct ListBase *list, const char *name);
+struct bConstraint *BKE_constraints_active_get(struct ListBase *list);
+void BKE_constraints_active_set(ListBase *list, struct bConstraint *con);
+struct bConstraint *BKE_constraints_find_name(struct ListBase *list, const char *name);
-struct bConstraint *BKE_add_ob_constraint(struct Object *ob, const char *name, short type);
-struct bConstraint *BKE_add_pose_constraint(struct Object *ob, struct bPoseChannel *pchan, const char *name, short type);
+struct bConstraint *BKE_constraint_add_for_object(struct Object *ob, const char *name, short type);
+struct bConstraint *BKE_constraint_add_for_pose(struct Object *ob, struct bPoseChannel *pchan, const char *name, short type);
-bool BKE_remove_constraint(ListBase *list, struct bConstraint *con);
-void BKE_remove_constraints_type(ListBase *list, short type, bool last_only);
+bool BKE_constraint_remove(ListBase *list, struct bConstraint *con);
/* Constraints + Proxies function prototypes */
-void BKE_extract_proxylocal_constraints(struct ListBase *dst, struct ListBase *src);
-bool BKE_proxylocked_constraints_owner(struct Object *ob, struct bPoseChannel *pchan);
+void BKE_constraints_proxylocal_extract(struct ListBase *dst, struct ListBase *src);
+bool BKE_constraints_proxylocked_owner(struct Object *ob, struct bPoseChannel *pchan);
/* Constraint Evaluation function prototypes */
struct bConstraintOb *BKE_constraints_make_evalob(struct Scene *scene, struct Object *ob, void *subdata, short datatype);
-void BKE_constraints_clear_evalob(struct bConstraintOb *cob);
+void BKE_constraints_clear_evalob(struct bConstraintOb *cob);
void BKE_constraint_mat_convertspace(struct Object *ob, struct bPoseChannel *pchan, float mat[4][4], short from, short to);
-void BKE_get_constraint_target_matrix(struct Scene *scene, struct bConstraint *con, int n, short ownertype, void *ownerdata, float mat[4][4], float ctime);
-void BKE_get_constraint_targets_for_solving(struct bConstraint *con, struct bConstraintOb *ob, struct ListBase *targets, float ctime);
-void BKE_solve_constraints(struct ListBase *conlist, struct bConstraintOb *cob, float ctime);
+void BKE_constraint_target_matrix_get(struct Scene *scene, struct bConstraint *con, int n, short ownertype, void *ownerdata, float mat[4][4], float ctime);
+void BKE_constraint_targets_for_solving_get(struct bConstraint *con, struct bConstraintOb *ob, struct ListBase *targets, float ctime);
+void BKE_constraints_solve(struct ListBase *conlist, struct bConstraintOb *cob, float ctime);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index d5efa09bdc9..e0bbe697c27 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -604,7 +604,7 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, const bool copy_constraints)
for (pchan = outPose->chanbase.first; pchan; pchan = pchan->next) {
if (copy_constraints) {
- BKE_copy_constraints(&listb, &pchan->constraints, true); // BKE_copy_constraints NULLs listb
+ BKE_constraints_copy(&listb, &pchan->constraints, true); // BKE_constraints_copy NULLs listb
pchan->constraints = listb;
pchan->mpath = NULL; /* motion paths should not get copied yet... */
}
@@ -727,7 +727,7 @@ void BKE_pose_channel_free_ex(bPoseChannel *pchan, bool do_id_user)
pchan->mpath = NULL;
}
- BKE_free_constraints(&pchan->constraints);
+ BKE_constraints_free(&pchan->constraints);
if (pchan->prop) {
IDP_FreeProperty(pchan->prop);
@@ -843,7 +843,7 @@ void BKE_pose_channel_copy_data(bPoseChannel *pchan, const bPoseChannel *pchan_f
pchan->iklinweight = pchan_from->iklinweight;
/* constraints */
- BKE_copy_constraints(&pchan->constraints, &pchan_from->constraints, true);
+ BKE_constraints_copy(&pchan->constraints, &pchan_from->constraints, true);
/* id-properties */
if (pchan->prop) {
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 845781f9abc..a8f533b8f55 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1659,16 +1659,16 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
* 2. copy proxy-pchan's constraints on-to new
* 3. add extracted local constraints back on top
*
- * Note for BKE_copy_constraints: when copying constraints, disable 'do_extern' otherwise
+ * Note for BKE_constraints_copy: when copying constraints, disable 'do_extern' otherwise
* we get the libs direct linked in this blend.
*/
- BKE_extract_proxylocal_constraints(&proxylocal_constraints, &pchan->constraints);
- BKE_copy_constraints(&pchanw.constraints, &pchanp->constraints, false);
+ BKE_constraints_proxylocal_extract(&proxylocal_constraints, &pchan->constraints);
+ BKE_constraints_copy(&pchanw.constraints, &pchanp->constraints, false);
BLI_movelisttolist(&pchanw.constraints, &proxylocal_constraints);
/* constraints - set target ob pointer to own object */
for (con = pchanw.constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -2473,7 +2473,7 @@ void BKE_pose_where_is_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float
cob = BKE_constraints_make_evalob(scene, ob, pchan, CONSTRAINT_OBTYPE_BONE);
/* Solve PoseChannel's Constraints */
- BKE_solve_constraints(&pchan->constraints, cob, ctime); /* ctime doesnt alter objects */
+ BKE_constraints_solve(&pchan->constraints, cob, ctime); /* ctime doesnt alter objects */
/* cleanup after Constraint Solving
* - applies matrix back to pchan, and frees temporary struct used
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 694474d5656..ccc576e74b3 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -89,6 +89,12 @@
# include "BPY_extern.h"
#endif
+/* ---------------------------------------------------------------------------- */
+/* Useful macros for testing various common flag combinations */
+
+/* Constraint Target Macros */
+#define VALID_CONS_TARGET(ct) ((ct) && (ct->tar))
+
/* Workaround for cyclic depenndnecy with curves.
* In such case curve_cache might not be ready yet,
*/
@@ -103,7 +109,7 @@
/* -------------- Naming -------------- */
/* Find the first available, non-duplicate name for a given constraint */
-void BKE_unique_constraint_name(bConstraint *con, ListBase *list)
+void BKE_constraint_unique_name(bConstraint *con, ListBase *list)
{
BLI_uniquename(list, con, DATA_("Const"), '.', offsetof(bConstraint, name), sizeof(con->name));
}
@@ -4235,7 +4241,7 @@ static void constraints_init_typeinfo(void)
/* This function should be used for getting the appropriate type-info when only
* a constraint type is known
*/
-bConstraintTypeInfo *BKE_get_constraint_typeinfo(int type)
+bConstraintTypeInfo *BKE_constraint_typeinfo_from_type(int type)
{
/* initialize the type-info list? */
if (CTI_INIT) {
@@ -4260,11 +4266,11 @@ bConstraintTypeInfo *BKE_get_constraint_typeinfo(int type)
/* This function should always be used to get the appropriate type-info, as it
* has checks which prevent segfaults in some weird cases.
*/
-bConstraintTypeInfo *BKE_constraint_get_typeinfo(bConstraint *con)
+bConstraintTypeInfo *BKE_constraint_typeinfo_get(bConstraint *con)
{
/* only return typeinfo for valid constraints */
if (con)
- return BKE_get_constraint_typeinfo(con->type);
+ return BKE_constraint_typeinfo_from_type(con->type);
else
return NULL;
}
@@ -4276,7 +4282,7 @@ bConstraintTypeInfo *BKE_constraint_get_typeinfo(bConstraint *con)
/* ---------- Data Management ------- */
-/* helper function for BKE_free_constraint_data() - unlinks references */
+/* helper function for BKE_constraint_free_data() - unlinks references */
static void con_unlink_refs_cb(bConstraint *UNUSED(con), ID **idpoin, bool is_reference, void *UNUSED(userData))
{
if (*idpoin && is_reference)
@@ -4287,10 +4293,10 @@ static void con_unlink_refs_cb(bConstraint *UNUSED(con), ID **idpoin, bool is_re
* be sure to run BIK_clear_data() when freeing an IK constraint,
* unless DAG_relations_tag_update is called.
*/
-void BKE_free_constraint_data(bConstraint *con)
+void BKE_constraint_free_data(bConstraint *con)
{
if (con->data) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
if (cti) {
/* perform any special freeing constraint may have */
@@ -4308,13 +4314,13 @@ void BKE_free_constraint_data(bConstraint *con)
}
/* Free all constraints from a constraint-stack */
-void BKE_free_constraints(ListBase *list)
+void BKE_constraints_free(ListBase *list)
{
bConstraint *con;
/* Free constraint data and also any extra data */
for (con = list->first; con; con = con->next)
- BKE_free_constraint_data(con);
+ BKE_constraint_free_data(con);
/* Free the whole list */
BLI_freelistN(list);
@@ -4322,10 +4328,10 @@ void BKE_free_constraints(ListBase *list)
/* Remove the specified constraint from the given constraint stack */
-bool BKE_remove_constraint(ListBase *list, bConstraint *con)
+bool BKE_constraint_remove(ListBase *list, bConstraint *con)
{
if (con) {
- BKE_free_constraint_data(con);
+ BKE_constraint_free_data(con);
BLI_freelinkN(list, con);
return 1;
}
@@ -4333,33 +4339,13 @@ bool BKE_remove_constraint(ListBase *list, bConstraint *con)
return 0;
}
-/* Remove all the constraints of the specified type from the given constraint stack */
-void BKE_remove_constraints_type(ListBase *list, short type, bool last_only)
-{
- bConstraint *con, *conp;
-
- if (list == NULL)
- return;
-
- /* remove from the end of the list to make it faster to find the last instance */
- for (con = list->last; con; con = conp) {
- conp = con->prev;
-
- if (con->type == type) {
- BKE_remove_constraint(list, con);
- if (last_only)
- return;
- }
- }
-}
-
/* ......... */
/* Creates a new constraint, initializes its data, and returns it */
static bConstraint *add_new_constraint_internal(const char *name, short type)
{
bConstraint *con = MEM_callocN(sizeof(bConstraint), "Constraint");
- bConstraintTypeInfo *cti = BKE_get_constraint_typeinfo(type);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_from_type(type);
const char *newName;
/* Set up a generic constraint datablock */
@@ -4409,17 +4395,17 @@ static bConstraint *add_new_constraint(Object *ob, bPoseChannel *pchan, const ch
* (otherwise unique-naming code will fail, since it assumes element exists in list)
*/
BLI_addtail(list, con);
- BKE_unique_constraint_name(con, list);
+ BKE_constraint_unique_name(con, list);
/* if the target list is a list on some PoseChannel belonging to a proxy-protected
* Armature layer, we must tag newly added constraints with a flag which allows them
* to persist after proxy syncing has been done
*/
- if (BKE_proxylocked_constraints_owner(ob, pchan))
+ if (BKE_constraints_proxylocked_owner(ob, pchan))
con->flag |= CONSTRAINT_PROXY_LOCAL;
/* make this constraint the active one */
- BKE_constraints_set_active(list, con);
+ BKE_constraints_active_set(list, con);
}
/* set type+owner specific immutable settings */
@@ -4443,7 +4429,7 @@ static bConstraint *add_new_constraint(Object *ob, bPoseChannel *pchan, const ch
/* ......... */
/* Add new constraint for the given bone */
-bConstraint *BKE_add_pose_constraint(Object *ob, bPoseChannel *pchan, const char *name, short type)
+bConstraint *BKE_constraint_add_for_pose(Object *ob, bPoseChannel *pchan, const char *name, short type)
{
if (pchan == NULL)
return NULL;
@@ -4452,14 +4438,14 @@ bConstraint *BKE_add_pose_constraint(Object *ob, bPoseChannel *pchan, const char
}
/* Add new constraint for the given object */
-bConstraint *BKE_add_ob_constraint(Object *ob, const char *name, short type)
+bConstraint *BKE_constraint_add_for_object(Object *ob, const char *name, short type)
{
return add_new_constraint(ob, NULL, name, type);
}
/* ......... */
-/* helper for BKE_relink_constraints() - call ID_NEW() on every ID reference the constraint has */
+/* helper for BKE_constraints_relink() - call ID_NEW() on every ID reference the constraint has */
static void con_relink_id_cb(bConstraint *UNUSED(con), ID **idpoin, bool UNUSED(is_reference), void *UNUSED(userdata))
{
/* ID_NEW() expects a struct with inline "id" member as first
@@ -4473,20 +4459,20 @@ static void con_relink_id_cb(bConstraint *UNUSED(con), ID **idpoin, bool UNUSED(
}
/* Reassign links that constraints have to other data (called during file loading?) */
-void BKE_relink_constraints(ListBase *conlist)
+void BKE_constraints_relink(ListBase *conlist)
{
/* just a wrapper around ID-loop for just calling ID_NEW() on all ID refs */
- BKE_id_loop_constraints(conlist, con_relink_id_cb, NULL);
+ BKE_constraints_id_loop(conlist, con_relink_id_cb, NULL);
}
/* Run the given callback on all ID-blocks in list of constraints */
-void BKE_id_loop_constraints(ListBase *conlist, ConstraintIDFunc func, void *userdata)
+void BKE_constraints_id_loop(ListBase *conlist, ConstraintIDFunc func, void *userdata)
{
bConstraint *con;
for (con = conlist->first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
if (cti) {
if (cti->id_looper)
@@ -4497,14 +4483,14 @@ void BKE_id_loop_constraints(ListBase *conlist, ConstraintIDFunc func, void *use
/* ......... */
-/* helper for BKE_copy_constraints(), to be used for making sure that ID's are valid */
+/* helper for BKE_constraints_copy(), to be used for making sure that ID's are valid */
static void con_extern_cb(bConstraint *UNUSED(con), ID **idpoin, bool UNUSED(is_reference), void *UNUSED(userData))
{
if (*idpoin && (*idpoin)->lib)
id_lib_extern(*idpoin);
}
-/* helper for BKE_copy_constraints(), to be used for making sure that usercounts of copied ID's are fixed up */
+/* helper for BKE_constraints_copy(), to be used for making sure that usercounts of copied ID's are fixed up */
static void con_fix_copied_refs_cb(bConstraint *UNUSED(con), ID **idpoin, bool is_reference, void *UNUSED(userData))
{
/* increment usercount if this is a reference type */
@@ -4513,7 +4499,7 @@ static void con_fix_copied_refs_cb(bConstraint *UNUSED(con), ID **idpoin, bool i
}
/* duplicate all of the constraints in a constraint stack */
-void BKE_copy_constraints(ListBase *dst, const ListBase *src, bool do_extern)
+void BKE_constraints_copy(ListBase *dst, const ListBase *src, bool do_extern)
{
bConstraint *con, *srccon;
@@ -4521,7 +4507,7 @@ void BKE_copy_constraints(ListBase *dst, const ListBase *src, bool do_extern)
BLI_duplicatelist(dst, src);
for (con = dst->first, srccon = src->first; con && srccon; srccon = srccon->next, con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
/* make a new copy of the constraint's data */
con->data = MEM_dupallocN(con->data);
@@ -4548,13 +4534,13 @@ void BKE_copy_constraints(ListBase *dst, const ListBase *src, bool do_extern)
/* ......... */
-bConstraint *BKE_constraints_findByName(ListBase *list, const char *name)
+bConstraint *BKE_constraints_find_name(ListBase *list, const char *name)
{
return BLI_findstring(list, name, offsetof(bConstraint, name));
}
/* finds the 'active' constraint in a constraint stack */
-bConstraint *BKE_constraints_get_active(ListBase *list)
+bConstraint *BKE_constraints_active_get(ListBase *list)
{
bConstraint *con;
@@ -4571,7 +4557,7 @@ bConstraint *BKE_constraints_get_active(ListBase *list)
}
/* Set the given constraint as the active one (clearing all the others) */
-void BKE_constraints_set_active(ListBase *list, bConstraint *con)
+void BKE_constraints_active_set(ListBase *list, bConstraint *con)
{
bConstraint *c;
@@ -4588,7 +4574,7 @@ void BKE_constraints_set_active(ListBase *list, bConstraint *con)
/* -------- Constraints and Proxies ------- */
/* Rescue all constraints tagged as being CONSTRAINT_PROXY_LOCAL (i.e. added to bone that's proxy-synced in this file) */
-void BKE_extract_proxylocal_constraints(ListBase *dst, ListBase *src)
+void BKE_constraints_proxylocal_extract(ListBase *dst, ListBase *src)
{
bConstraint *con, *next;
@@ -4605,7 +4591,7 @@ void BKE_extract_proxylocal_constraints(ListBase *dst, ListBase *src)
}
/* Returns if the owner of the constraint is proxy-protected */
-bool BKE_proxylocked_constraints_owner(Object *ob, bPoseChannel *pchan)
+bool BKE_constraints_proxylocked_owner(Object *ob, bPoseChannel *pchan)
{
/* Currently, constraints can only be on object or bone level */
if (ob && ob->proxy) {
@@ -4634,9 +4620,9 @@ bool BKE_proxylocked_constraints_owner(Object *ob, bPoseChannel *pchan)
* None of the actual calculations of the matrices should be done here! Also, this function is
* not to be used by any new constraints, particularly any that have multiple targets.
*/
-void BKE_get_constraint_target_matrix(Scene *scene, bConstraint *con, int index, short ownertype, void *ownerdata, float mat[4][4], float ctime)
+void BKE_constraint_target_matrix_get(Scene *scene, bConstraint *con, int index, short ownertype, void *ownerdata, float mat[4][4], float ctime)
{
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
bConstraintOb *cob;
bConstraintTarget *ct;
@@ -4701,9 +4687,9 @@ void BKE_get_constraint_target_matrix(Scene *scene, bConstraint *con, int index,
}
/* Get the list of targets required for solving a constraint */
-void BKE_get_constraint_targets_for_solving(bConstraint *con, bConstraintOb *cob, ListBase *targets, float ctime)
+void BKE_constraint_targets_for_solving_get(bConstraint *con, bConstraintOb *cob, ListBase *targets, float ctime)
{
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
if (cti && cti->get_constraint_targets) {
bConstraintTarget *ct;
@@ -4736,7 +4722,7 @@ void BKE_get_constraint_targets_for_solving(bConstraint *con, bConstraintOb *cob
* BKE_constraints_make_evalob and BKE_constraints_clear_evalob should be called before and
* after running this function, to sort out cob
*/
-void BKE_solve_constraints(ListBase *conlist, bConstraintOb *cob, float ctime)
+void BKE_constraints_solve(ListBase *conlist, bConstraintOb *cob, float ctime)
{
bConstraint *con;
float oldmat[4][4];
@@ -4748,7 +4734,7 @@ void BKE_solve_constraints(ListBase *conlist, bConstraintOb *cob, float ctime)
/* loop over available constraints, solving and blending them */
for (con = conlist->first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
/* these we can skip completely (invalid constraints...) */
@@ -4771,7 +4757,7 @@ void BKE_solve_constraints(ListBase *conlist, bConstraintOb *cob, float ctime)
BKE_constraint_mat_convertspace(cob->ob, cob->pchan, cob->matrix, CONSTRAINT_SPACE_WORLD, con->ownspace);
/* prepare targets for constraint solving */
- BKE_get_constraint_targets_for_solving(con, cob, &targets, ctime);
+ BKE_constraint_targets_for_solving_get(con, cob, &targets, ctime);
/* Solve the constraint and put result in cob->matrix */
cti->evaluate_constraint(con, cob, &targets);
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 69b07472ea9..df1695daf5b 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -508,7 +508,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
for (con = pchan->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -796,7 +796,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
/* object constraints */
for (con = ob->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -1978,7 +1978,7 @@ static void dag_object_time_update_flags(Main *bmain, Scene *scene, Object *ob)
if (ob->constraints.first) {
bConstraint *con;
for (con = ob->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -2481,7 +2481,7 @@ static void dag_id_flush_update(Main *bmain, Scene *sce, ID *id)
for (obt = bmain->object.first; obt; obt = obt->id.next) {
bConstraint *con;
for (con = obt->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
if (ELEM3(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_CAMERASOLVER,
CONSTRAINT_TYPE_OBJECTSOLVER))
{
@@ -2854,7 +2854,7 @@ void DAG_pose_sort(Object *ob)
addtoroot = 0;
}
for (con = pchan->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index a778a074722..10a1d306707 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -536,7 +536,7 @@ static int subframe_updateObject(Scene *scene, Object *ob, int flags, int parent
/* also update constraint targets */
for (con = ob->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
if (cti && cti->get_constraint_targets) {
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index 4787dbb0701..c6e53dfb7db 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -230,7 +230,7 @@ void BKE_library_foreach_ID_link(ID *id, LibraryIDLinkCallback callback, void *u
pose_channel = pose_channel->next)
{
CALLBACK_INVOKE(pose_channel->custom, IDWALK_NOP);
- BKE_id_loop_constraints(&pose_channel->constraints,
+ BKE_constraints_id_loop(&pose_channel->constraints,
library_foreach_constraintObjectLooper,
&data);
}
@@ -239,7 +239,7 @@ void BKE_library_foreach_ID_link(ID *id, LibraryIDLinkCallback callback, void *u
modifiers_foreachIDLink(object,
library_foreach_modifiersForeachIDLink,
&data);
- BKE_id_loop_constraints(&object->constraints,
+ BKE_constraints_id_loop(&object->constraints,
library_foreach_constraintObjectLooper,
&data);
break;
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index cae46199285..20b6f72a60b 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -394,7 +394,7 @@ void BKE_object_free_ex(Object *ob, bool do_id_user)
free_controllers(&ob->controllers);
free_actuators(&ob->actuators);
- BKE_free_constraints(&ob->constraints);
+ BKE_constraints_free(&ob->constraints);
free_partdeflect(ob->pd);
BKE_rigidbody_free_object(ob);
@@ -500,7 +500,7 @@ void BKE_object_unlink(Object *ob)
bPoseChannel *pchan;
for (pchan = obt->pose->chanbase.first; pchan; pchan = pchan->next) {
for (con = pchan->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -531,7 +531,7 @@ void BKE_object_unlink(Object *ob)
sca_remove_ob_poin(obt, ob);
for (con = obt->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -1375,7 +1375,7 @@ static void copy_object_pose(Object *obn, Object *ob)
}
for (con = chan->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
@@ -1487,7 +1487,7 @@ Object *BKE_object_copy_ex(Main *bmain, Object *ob, bool copy_caches)
BKE_pose_rebuild(obn, obn->data);
}
defgroup_copy_list(&obn->defbase, &ob->defbase);
- BKE_copy_constraints(&obn->constraints, &ob->constraints, true);
+ BKE_constraints_copy(&obn->constraints, &ob->constraints, true);
obn->mode = 0;
obn->sculpt = NULL;
@@ -2349,7 +2349,7 @@ void BKE_object_where_is_calc_time_ex(Scene *scene, Object *ob, float ctime,
if (ob->constraints.first && !(ob->transflag & OB_NO_CONSTRAINTS)) {
bConstraintOb *cob;
cob = BKE_constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
- BKE_solve_constraints(&ob->constraints, cob, ctime);
+ BKE_constraints_solve(&ob->constraints, cob, ctime);
BKE_constraints_clear_evalob(cob);
}
@@ -3439,11 +3439,11 @@ void BKE_object_relink(Object *ob)
if (ob->id.lib)
return;
- BKE_relink_constraints(&ob->constraints);
+ BKE_constraints_relink(&ob->constraints);
if (ob->pose) {
bPoseChannel *chan;
for (chan = ob->pose->chanbase.first; chan; chan = chan->next) {
- BKE_relink_constraints(&chan->constraints);
+ BKE_constraints_relink(&chan->constraints);
}
}
modifiers_foreachIDLink(ob, copy_object__forwardModifierLinks, NULL);
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 8a912a277ae..3d0045b838e 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -974,7 +974,7 @@ static bool subframe_updateObject(Scene *scene, Object *ob, int update_mesh, int
/* also update constraint targets */
for (con = ob->constraints.first; con; con = con->next) {
- bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con);
+ bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {NULL, NULL};
if (cti && cti->get_constraint_targets) {