Blender V4.5
constraint.cc File Reference
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <cstddef>
#include <cstdio>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_kdopbvh.hh"
#include "BLI_listbase.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLI_math_vector.hh"
#include "BLI_string.h"
#include "BLI_string_utils.hh"
#include "BLI_utildefines.h"
#include "BLT_translation.hh"
#include "DNA_action_types.h"
#include "DNA_armature_types.h"
#include "DNA_cachefile_types.h"
#include "DNA_constraint_types.h"
#include "DNA_curve_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_lattice_types.h"
#include "DNA_movieclip_types.h"
#include "DNA_scene_types.h"
#include "DNA_tracking_types.h"
#include "BKE_action.hh"
#include "BKE_anim_path.h"
#include "BKE_animsys.h"
#include "BKE_armature.hh"
#include "BKE_bvhutils.hh"
#include "BKE_cachefile.hh"
#include "BKE_camera.h"
#include "BKE_constraint.h"
#include "BKE_curve.hh"
#include "BKE_deform.hh"
#include "BKE_displist.h"
#include "BKE_editmesh.hh"
#include "BKE_fcurve_driver.h"
#include "BKE_global.hh"
#include "BKE_idprop.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_query.hh"
#include "BKE_library.hh"
#include "BKE_mesh_runtime.hh"
#include "BKE_movieclip.h"
#include "BKE_object.hh"
#include "BKE_object_types.hh"
#include "BKE_scene.hh"
#include "BKE_shrinkwrap.hh"
#include "BKE_tracking.h"
#include "BIK_api.h"
#include "RNA_prototypes.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "BLO_read_write.hh"
#include "CLG_log.h"

Go to the source code of this file.

Classes

struct  FollowTrackContext

Macros

#define DNA_DEPRECATED_ALLOW
#define VALID_CONS_TARGET(ct)
#define SINGLETARGET_GET_TARS(con, datatar, datasubtarget, ct, list)
#define SINGLETARGETNS_GET_TARS(con, datatar, ct, list)
#define SINGLETARGET_FLUSH_TARS(con, datatar, datasubtarget, ct, list, no_copy)
#define SINGLETARGETNS_FLUSH_TARS(con, datatar, ct, list, no_copy)

Functions

static void damptrack_do_transform (float matrix[4][4], const float tarvec[3], int track_axis)
static bConstraintconstraint_find_original (Object *ob, bPoseChannel *pchan, bConstraint *con, Object **r_orig_ob)
static bConstraintconstraint_find_original_for_update (bConstraintOb *cob, bConstraint *con)
void BKE_constraint_unique_name (bConstraint *con, ListBase *list)
bConstraintObBKE_constraints_make_evalob (Depsgraph *depsgraph, Scene *scene, Object *ob, void *subdata, short datatype)
void BKE_constraints_clear_evalob (bConstraintOb *cob)
void BKE_constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, bConstraintOb *cob, float mat[4][4], short from, short to, const bool keep_scale)
static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat[4][4])
static void contarget_get_lattice_mat (Object *ob, const char *substring, float mat[4][4])
static void constraint_target_to_mat4 (Object *ob, const char *substring, bConstraintOb *cob, float mat[4][4], short from, short to, short flag, float headtail)
static void unit_ct_matrix_nullsafe (bConstraintTarget *ct)
static bool default_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static bool default_get_tarmat_full_bbone (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static bool is_custom_space_needed (bConstraint *con)
static void childof_new_data (void *cdata)
static void childof_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int childof_get_tars (bConstraint *con, ListBase *list)
static void childof_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void childof_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void trackto_new_data (void *cdata)
static void trackto_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int trackto_get_tars (bConstraint *con, ListBase *list)
static void trackto_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static int basis_cross (int n, int m)
static void vectomat (const float vec[3], const float target_up[3], short axis, short upflag, short flags, float m[3][3])
static void trackto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void kinematic_new_data (void *cdata)
static void kinematic_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int kinematic_get_tars (bConstraint *con, ListBase *list)
static void kinematic_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static bool kinematic_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void followpath_new_data (void *cdata)
static void followpath_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int followpath_get_tars (bConstraint *con, ListBase *list)
static void followpath_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static bool followpath_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *, bConstraintTarget *ct, float)
static void followpath_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void loclimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *)
static float wrap_rad_angle (const float angle)
static float clamp_angle (const float angle, const float min, const float max)
static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *)
static void sizelimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *)
static void loclike_new_data (void *cdata)
static void loclike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int loclike_get_tars (bConstraint *con, ListBase *list)
static void loclike_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void loclike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void rotlike_new_data (void *cdata)
static void rotlike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int rotlike_get_tars (bConstraint *con, ListBase *list)
static void rotlike_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void sizelike_new_data (void *cdata)
static void sizelike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int sizelike_get_tars (bConstraint *con, ListBase *list)
static void sizelike_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void sizelike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void translike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int translike_get_tars (bConstraint *con, ListBase *list)
static void translike_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void translike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void samevolume_new_data (void *cdata)
static void samevolume_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *)
static void armdef_free (bConstraint *con)
static void armdef_copy (bConstraint *con, bConstraint *srccon)
static int armdef_get_tars (bConstraint *con, ListBase *list)
static void armdef_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static bool armdef_get_tarmat (Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void armdef_accumulate_matrix (const float obmat[4][4], const float iobmat[4][4], const float basemat[4][4], const float bonemat[4][4], const float pivot[3], const float weight, float r_sum_mat[4][4], DualQuat *r_sum_dq)
static void armdef_accumulate_bone (const bConstraintTarget *ct, const bPoseChannel *pchan, const float wco[3], const bool force_envelope, float *r_totweight, float r_sum_mat[4][4], DualQuat *r_sum_dq)
static void armdef_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void actcon_new_data (void *cdata)
static void actcon_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int actcon_get_tars (bConstraint *con, ListBase *list)
static void actcon_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static bool actcon_get_tarmat (Depsgraph *depsgraph, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void actcon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void locktrack_new_data (void *cdata)
static void locktrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int locktrack_get_tars (bConstraint *con, ListBase *list)
static void locktrack_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void distlimit_new_data (void *cdata)
static void distlimit_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int distlimit_get_tars (bConstraint *con, ListBase *list)
static void distlimit_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void distlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void stretchto_new_data (void *cdata)
static void stretchto_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int stretchto_get_tars (bConstraint *con, ListBase *list)
static void stretchto_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void stretchto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void minmax_new_data (void *cdata)
static void minmax_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int minmax_get_tars (bConstraint *con, ListBase *list)
static void minmax_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void minmax_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void clampto_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int clampto_get_tars (bConstraint *con, ListBase *list)
static void clampto_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static bool clampto_get_tarmat (Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void clampto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void transform_new_data (void *cdata)
static void transform_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int transform_get_tars (bConstraint *con, ListBase *list)
static void transform_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void shrinkwrap_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static void shrinkwrap_new_data (void *cdata)
static int shrinkwrap_get_tars (bConstraint *con, ListBase *list)
static void shrinkwrap_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static bool shrinkwrap_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void shrinkwrap_evaluate (bConstraint *, bConstraintOb *cob, ListBase *targets)
static void damptrack_new_data (void *cdata)
static void damptrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int damptrack_get_tars (bConstraint *con, ListBase *list)
static void damptrack_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void damptrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void splineik_free (bConstraint *con)
static void splineik_copy (bConstraint *con, bConstraint *srccon)
static void splineik_new_data (void *cdata)
static void splineik_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int splineik_get_tars (bConstraint *con, ListBase *list)
static void splineik_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static bool splineik_get_tarmat (Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void pivotcon_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int pivotcon_get_tars (bConstraint *con, ListBase *list)
static void pivotcon_flush_tars (bConstraint *con, ListBase *list, bool no_copy)
static void pivotcon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void followtrack_new_data (void *cdata)
static void followtrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static MovieClipfollowtrack_tracking_clip_get (bConstraint *con, bConstraintOb *cob)
static MovieTrackingObjectfollowtrack_tracking_object_get (bConstraint *con, bConstraintOb *cob)
static Objectfollowtrack_camera_object_get (bConstraint *con, bConstraintOb *cob)
static bool followtrack_context_init (FollowTrackContext *context, bConstraint *con, bConstraintOb *cob)
static void followtrack_evaluate_using_3d_position_object (FollowTrackContext *context, bConstraintOb *cob)
static void followtrack_evaluate_using_3d_position_camera (FollowTrackContext *context, bConstraintOb *cob)
static void followtrack_evaluate_using_3d_position (FollowTrackContext *context, bConstraintOb *cob)
static void followtrack_undistort_if_needed (FollowTrackContext *context, const int clip_width, const int clip_height, float marker_position[2])
static void followtrack_fit_frame (FollowTrackContext *context, const int clip_width, const int clip_height, float marker_position[2])
static float followtrack_distance_from_viewplane_get (FollowTrackContext *context, bConstraintOb *cob)
static void followtrack_project_to_depth_object_if_needed (FollowTrackContext *context, bConstraintOb *cob)
static void followtrack_evaluate_using_2d_position (FollowTrackContext *context, bConstraintOb *cob)
static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *)
static void camerasolver_new_data (void *cdata)
static void camerasolver_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static void camerasolver_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *)
static void objectsolver_new_data (void *cdata)
static void objectsolver_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static void objectsolver_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *)
static void transformcache_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static void transformcache_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void transformcache_copy (bConstraint *con, bConstraint *srccon)
static void transformcache_free (bConstraint *con)
static void transformcache_new_data (void *cdata)
static void constraints_init_typeinfo ()
const bConstraintTypeInfoBKE_constraint_typeinfo_from_type (int type)
const bConstraintTypeInfoBKE_constraint_typeinfo_get (bConstraint *con)
static void con_unlink_refs_cb (bConstraint *, ID **idpoin, bool is_reference, void *)
static void con_invoke_id_looper (const bConstraintTypeInfo *cti, bConstraint *con, ConstraintIDFunc func, const int flag, void *userdata)
void BKE_constraint_free_data_ex (bConstraint *con, bool do_id_user)
void BKE_constraint_free_data (bConstraint *con)
void BKE_constraints_free_ex (ListBase *list, bool do_id_user)
void BKE_constraints_free (ListBase *list)
static bool constraint_remove (ListBase *list, bConstraint *con)
bool BKE_constraint_remove_ex (ListBase *list, Object *ob, bConstraint *con)
bool BKE_constraint_apply_for_object (Depsgraph *depsgraph, Scene *scene, Object *ob, bConstraint *con)
bool BKE_constraint_apply_and_remove_for_object (Depsgraph *depsgraph, Scene *scene, ListBase *constraints, Object *ob, bConstraint *con)
bool BKE_constraint_apply_for_pose (Depsgraph *depsgraph, Scene *scene, Object *ob, bPoseChannel *pchan, bConstraint *con)
bool BKE_constraint_apply_and_remove_for_pose (Depsgraph *depsgraph, Scene *scene, ListBase *constraints, Object *ob, bConstraint *con, bPoseChannel *pchan)
void BKE_constraint_panel_expand (bConstraint *con)
static bConstraintadd_new_constraint_internal (const char *name, short type)
static void add_new_constraint_to_list (Object *ob, bPoseChannel *pchan, bConstraint *con)
static bConstraintadd_new_constraint (Object *ob, bPoseChannel *pchan, const char *name, short type)
bool BKE_constraint_target_uses_bbone (bConstraint *con, bConstraintTarget *ct)
bConstraintBKE_constraint_add_for_pose (Object *ob, bPoseChannel *pchan, const char *name, short type)
bConstraintBKE_constraint_add_for_object (Object *ob, const char *name, short type)
void BKE_constraints_id_loop (ListBase *conlist, ConstraintIDFunc func, const int flag, void *userdata)
static void con_extern_cb (bConstraint *, ID **idpoin, bool, void *)
static void con_fix_copied_refs_cb (bConstraint *, ID **idpoin, bool is_reference, void *)
static void constraint_copy_data_ex (bConstraint *dst, bConstraint *src, const int flag, const bool do_extern)
bConstraintBKE_constraint_duplicate_ex (bConstraint *src, const int flag, const bool do_extern)
bConstraintBKE_constraint_copy_for_pose (Object *ob, bPoseChannel *pchan, bConstraint *src)
bConstraintBKE_constraint_copy_for_object (Object *ob, bConstraint *src)
void BKE_constraints_copy_ex (ListBase *dst, const ListBase *src, const int flag, bool do_extern)
void BKE_constraints_copy (ListBase *dst, const ListBase *src, bool do_extern)
bConstraintBKE_constraints_find_name (ListBase *list, const char *name)
bConstraintBKE_constraints_active_get (ListBase *list)
void BKE_constraints_active_set (ListBase *list, bConstraint *con)
static bConstraintconstraint_list_find_from_target (ListBase *constraints, bConstraintTarget *tgt)
bConstraintBKE_constraint_find_from_target (Object *ob, bConstraintTarget *tgt, bPoseChannel **r_pchan)
bool BKE_constraint_is_nonlocal_in_liboverride (const Object *ob, const bConstraint *con)
int BKE_constraint_targets_get (bConstraint *con, ListBase *r_targets)
void BKE_constraint_targets_flush (bConstraint *con, ListBase *targets, bool no_copy)
void BKE_constraint_target_matrix_get (Depsgraph *depsgraph, Scene *scene, bConstraint *con, int index, short ownertype, void *ownerdata, float mat[4][4], float ctime)
void BKE_constraint_targets_for_solving_get (Depsgraph *depsgraph, bConstraint *con, bConstraintOb *cob, ListBase *targets, float ctime)
void BKE_constraint_custom_object_space_init (bConstraintOb *cob, bConstraint *con)
void BKE_constraints_solve (Depsgraph *depsgraph, ListBase *conlist, bConstraintOb *cob, float ctime)
void BKE_constraint_blend_write (BlendWriter *writer, ListBase *conlist)
void BKE_constraint_blend_read_data (BlendDataReader *reader, ID *id_owner, ListBase *lb)

Variables

static CLG_LogRef LOG = {"bke.constraint"}
static bConstraintTypeInfo CTI_CHILDOF
static bConstraintTypeInfo CTI_TRACKTO
static bConstraintTypeInfo CTI_KINEMATIC
static bConstraintTypeInfo CTI_FOLLOWPATH
static bConstraintTypeInfo CTI_LOCLIMIT
static bConstraintTypeInfo CTI_ROTLIMIT
static bConstraintTypeInfo CTI_SIZELIMIT
static bConstraintTypeInfo CTI_LOCLIKE
static bConstraintTypeInfo CTI_ROTLIKE
static bConstraintTypeInfo CTI_SIZELIKE
static bConstraintTypeInfo CTI_TRANSLIKE
static bConstraintTypeInfo CTI_SAMEVOL
static bConstraintTypeInfo CTI_ARMATURE
static bConstraintTypeInfo CTI_ACTION
static bConstraintTypeInfo CTI_LOCKTRACK
static bConstraintTypeInfo CTI_DISTLIMIT
static bConstraintTypeInfo CTI_STRETCHTO
static bConstraintTypeInfo CTI_MINMAX
static bConstraintTypeInfo CTI_CLAMPTO
static bConstraintTypeInfo CTI_TRANSFORM
static bConstraintTypeInfo CTI_SHRINKWRAP
static const float track_dir_vecs [6][3]
static bConstraintTypeInfo CTI_DAMPTRACK
static bConstraintTypeInfo CTI_SPLINEIK
static bConstraintTypeInfo CTI_PIVOT
static bConstraintTypeInfo CTI_FOLLOWTRACK
static bConstraintTypeInfo CTI_CAMERASOLVER
static bConstraintTypeInfo CTI_OBJECTSOLVER
static bConstraintTypeInfo CTI_TRANSFORM_CACHE
static bConstraintTypeInfoconstraintsTypeInfo [NUM_CONSTRAINT_TYPES]
static short CTI_INIT = 1

Macro Definition Documentation

◆ DNA_DEPRECATED_ALLOW

#define DNA_DEPRECATED_ALLOW

Definition at line 10 of file constraint.cc.

◆ SINGLETARGET_FLUSH_TARS

#define SINGLETARGET_FLUSH_TARS ( con,
datatar,
datasubtarget,
ct,
list,
no_copy )
Value:
{ \
if (ct) { \
bConstraintTarget *ctn = ct->next; \
if (no_copy == 0) { \
datatar = ct->tar; \
STRNCPY(datasubtarget, ct->subtarget); \
con->tarspace = char(ct->space); \
} \
\
BLI_freelinkN(list, ct); \
ct = ctn; \
} \
} \
(void)0
struct bConstraintTarget * next

Definition at line 937 of file constraint.cc.

Referenced by actcon_flush_tars(), childof_flush_tars(), damptrack_flush_tars(), distlimit_flush_tars(), kinematic_flush_tars(), locktrack_flush_tars(), loclike_flush_tars(), minmax_flush_tars(), pivotcon_flush_tars(), rotlike_flush_tars(), sizelike_flush_tars(), stretchto_flush_tars(), trackto_flush_tars(), transform_flush_tars(), and translike_flush_tars().

◆ SINGLETARGET_GET_TARS

#define SINGLETARGET_GET_TARS ( con,
datatar,
datasubtarget,
ct,
list )
Value:
{ \
ct = MEM_callocN<bConstraintTarget>("tempConstraintTarget"); \
\
ct->tar = datatar; \
STRNCPY(ct->subtarget, datasubtarget); \
ct->space = con->tarspace; \
ct->flag = CONSTRAINT_TAR_TEMP; \
\
if (ct->tar) { \
if ((ct->tar->type == OB_ARMATURE) && (ct->subtarget[0])) { \
bPoseChannel *pchan = BKE_pose_channel_find_name(ct->tar->pose, ct->subtarget); \
ct->type = CONSTRAINT_OBTYPE_BONE; \
ct->rotOrder = (pchan) ? (pchan->rotmode) : int(EULER_ORDER_DEFAULT); \
} \
else if (OB_TYPE_SUPPORT_VGROUP(ct->tar->type) && (ct->subtarget[0])) { \
ct->type = CONSTRAINT_OBTYPE_VERT; \
ct->rotOrder = EULER_ORDER_DEFAULT; \
} \
else { \
ct->rotOrder = ct->tar->rotmode; \
} \
} \
\
BLI_addtail(list, ct); \
} \
(void)0
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
@ EULER_ORDER_DEFAULT
@ CONSTRAINT_TAR_TEMP
@ CONSTRAINT_OBTYPE_OBJECT
@ CONSTRAINT_OBTYPE_BONE
@ CONSTRAINT_OBTYPE_VERT
@ OB_ARMATURE
#define OB_TYPE_SUPPORT_VGROUP(_type)
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118

Definition at line 881 of file constraint.cc.

Referenced by actcon_get_tars(), BKE_constraint_targets_get(), childof_get_tars(), damptrack_get_tars(), distlimit_get_tars(), kinematic_get_tars(), locktrack_get_tars(), loclike_get_tars(), minmax_get_tars(), pivotcon_get_tars(), rotlike_get_tars(), sizelike_get_tars(), stretchto_get_tars(), trackto_get_tars(), transform_get_tars(), and translike_get_tars().

◆ SINGLETARGETNS_FLUSH_TARS

#define SINGLETARGETNS_FLUSH_TARS ( con,
datatar,
ct,
list,
no_copy )
Value:
{ \
if (ct) { \
bConstraintTarget *ctn = ct->next; \
if (no_copy == 0) { \
datatar = ct->tar; \
con->tarspace = char(ct->space); \
} \
\
BLI_freelinkN(list, ct); \
ct = ctn; \
} \
} \
(void)0

Definition at line 959 of file constraint.cc.

Referenced by clampto_flush_tars(), followpath_flush_tars(), shrinkwrap_flush_tars(), and splineik_flush_tars().

◆ SINGLETARGETNS_GET_TARS

#define SINGLETARGETNS_GET_TARS ( con,
datatar,
ct,
list )
Value:
{ \
ct = MEM_callocN<bConstraintTarget>("tempConstraintTarget"); \
\
ct->tar = datatar; \
ct->space = con->tarspace; \
ct->flag = CONSTRAINT_TAR_TEMP; \
\
if (ct->tar) { \
} \
BLI_addtail(list, ct); \
} \
(void)0

Definition at line 916 of file constraint.cc.

Referenced by clampto_get_tars(), followpath_get_tars(), shrinkwrap_get_tars(), and splineik_get_tars().

◆ VALID_CONS_TARGET

Function Documentation

◆ actcon_evaluate()

◆ actcon_flush_tars()

void actcon_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 2757 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ actcon_get_tarmat()

◆ actcon_get_tars()

int actcon_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 2742 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ actcon_id_looper()

void actcon_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 2731 of file constraint.cc.

References bConstraint::data, and data.

◆ actcon_new_data()

void actcon_new_data ( void * cdata)
static

Definition at line 2720 of file constraint.cc.

References ACTCON_MIX_AFTER, and data.

◆ add_new_constraint()

◆ add_new_constraint_internal()

◆ add_new_constraint_to_list()

◆ armdef_accumulate_bone()

◆ armdef_accumulate_matrix()

void armdef_accumulate_matrix ( const float obmat[4][4],
const float iobmat[4][4],
const float basemat[4][4],
const float bonemat[4][4],
const float pivot[3],
const float weight,
float r_sum_mat[4][4],
DualQuat * r_sum_dq )
static

◆ armdef_copy()

void armdef_copy ( bConstraint * con,
bConstraint * srccon )
static

◆ armdef_evaluate()

◆ armdef_free()

void armdef_free ( bConstraint * con)
static

Definition at line 2471 of file constraint.cc.

References BLI_freelistN(), bConstraint::data, and data.

◆ armdef_get_tarmat()

◆ armdef_get_tars()

int armdef_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 2487 of file constraint.cc.

References BLI_listbase_count(), bConstraint::data, and data.

◆ armdef_id_looper()

void armdef_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 2500 of file constraint.cc.

References bConstraint::data, data, and LISTBASE_FOREACH.

◆ basis_cross()

int basis_cross ( int n,
int m )
static

Definition at line 1205 of file constraint.cc.

Referenced by vectomat().

◆ BKE_constraint_add_for_object()

◆ BKE_constraint_add_for_pose()

bConstraint * BKE_constraint_add_for_pose ( struct Object * ob,
struct bPoseChannel * pchan,
const char * name,
short type )

Add new constraint for the given bone.

Definition at line 5871 of file constraint.cc.

References add_new_constraint().

Referenced by blender::ed::transform::add_temporary_ik_constraint(), and blender::ed::object::constraint_add_exec().

◆ BKE_constraint_apply_and_remove_for_object()

bool BKE_constraint_apply_and_remove_for_object ( Depsgraph * depsgraph,
Scene * scene,
ListBase * constraints,
Object * ob,
bConstraint * con )

◆ BKE_constraint_apply_and_remove_for_pose()

bool BKE_constraint_apply_and_remove_for_pose ( Depsgraph * depsgraph,
Scene * scene,
ListBase * constraints,
Object * ob,
bConstraint * con,
bPoseChannel * pchan )

◆ BKE_constraint_apply_for_object()

◆ BKE_constraint_apply_for_pose()

◆ BKE_constraint_blend_read_data()

◆ BKE_constraint_blend_write()

◆ BKE_constraint_copy_for_object()

bConstraint * BKE_constraint_copy_for_object ( struct Object * ob,
struct bConstraint * src )

◆ BKE_constraint_copy_for_pose()

bConstraint * BKE_constraint_copy_for_pose ( struct Object * ob,
struct bPoseChannel * pchan,
struct bConstraint * src )

◆ BKE_constraint_custom_object_space_init()

void BKE_constraint_custom_object_space_init ( struct bConstraintOb * cob,
struct bConstraint * con )

◆ BKE_constraint_duplicate_ex()

bConstraint * BKE_constraint_duplicate_ex ( struct bConstraint * src,
int flag,
bool do_extern )

Allocate and duplicate a single constraint, outside of any object/pose context.

Definition at line 5963 of file constraint.cc.

References constraint_copy_data_ex(), flag, MEM_dupallocN(), bConstraint::next, and bConstraint::prev.

Referenced by BKE_constraint_apply_for_object(), BKE_constraint_apply_for_pose(), BKE_constraint_copy_for_object(), and BKE_constraint_copy_for_pose().

◆ BKE_constraint_find_from_target()

bConstraint * BKE_constraint_find_from_target ( struct Object * ob,
struct bConstraintTarget * tgt,
struct bPoseChannel ** r_pchan )

Finds the constraint that owns the given target within the object.

Definition at line 6068 of file constraint.cc.

References bPose::chanbase, constraint_list_find_from_target(), Object::constraints, LISTBASE_FOREACH, Object::pose, and result.

Referenced by blender::deg::RNANodeQuery::construct_node_identifier().

◆ BKE_constraint_free_data()

void BKE_constraint_free_data ( bConstraint * con)

◆ BKE_constraint_free_data_ex()

void BKE_constraint_free_data_ex ( struct bConstraint * con,
bool do_id_user )

Free data of a specific constraint if it has any info. Be sure to run BIK_clear_data() when freeing an IK constraint, unless #DAG_relations_tag_update is called.

Definition at line 5561 of file constraint.cc.

References BKE_constraint_typeinfo_get(), con_invoke_id_looper(), con_unlink_refs_cb(), bConstraint::data, bConstraintTypeInfo::free_data, IDWALK_NOP, and MEM_freeN().

Referenced by BKE_constraint_free_data(), and BKE_constraints_free_ex().

◆ BKE_constraint_is_nonlocal_in_liboverride()

bool BKE_constraint_is_nonlocal_in_liboverride ( const Object * ob,
const bConstraint * con )

◆ BKE_constraint_mat_convertspace()

◆ BKE_constraint_panel_expand()

void BKE_constraint_panel_expand ( bConstraint * con)

◆ BKE_constraint_remove_ex()

◆ BKE_constraint_target_matrix_get()

void BKE_constraint_target_matrix_get ( struct Depsgraph * depsgraph,
struct Scene * scene,
struct bConstraint * con,
int index,
short ownertype,
void * ownerdata,
float mat[4][4],
float ctime )

This function is a relic from the prior implementations of the constraints system, when all constraints either had one or no targets. It used to be called during the main constraint solving loop, but is now only used for the remaining cases for a few constraints.

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.

Definition at line 6230 of file constraint.cc.

References BKE_constraint_custom_object_space_init(), BKE_constraint_typeinfo_get(), BLI_findlink(), CONSTRAINT_OBTYPE_BONE, CONSTRAINT_OBTYPE_OBJECT, copy_m4_m4(), bConstraintOb::depsgraph, depsgraph, bConstraintTypeInfo::flush_constraint_targets, bConstraintTypeInfo::get_constraint_targets, bConstraintTypeInfo::get_target_matrix, bConstraintOb::matrix, bConstraintTarget::matrix, MEM_callocN(), MEM_freeN(), bConstraintOb::ob, bConstraintOb::pchan, bPoseChannel::pose_mat, bConstraintOb::scene, bConstraintOb::startmat, bConstraintOb::type, and unit_m4().

Referenced by base_callback(), execute_posetree(), blender::ed::object::parent_set_with_depsgraph(), and target_callback().

◆ BKE_constraint_target_uses_bbone()

◆ BKE_constraint_targets_flush()

◆ BKE_constraint_targets_for_solving_get()

void BKE_constraint_targets_for_solving_get ( struct Depsgraph * depsgraph,
struct bConstraint * con,
struct bConstraintOb * ob,
struct ListBase * targets,
float ctime )

◆ BKE_constraint_targets_get()

◆ BKE_constraint_typeinfo_from_type()

◆ BKE_constraint_typeinfo_get()

◆ BKE_constraint_unique_name()

void BKE_constraint_unique_name ( struct bConstraint * con,
struct ListBase * list )

Find the first available, non-duplicate name for a given constraint.

Definition at line 121 of file constraint.cc.

References BLI_uniquename(), DATA_, bConstraint::name, and offsetof.

Referenced by add_new_constraint_to_list().

◆ BKE_constraints_active_get()

bConstraint * BKE_constraints_active_get ( struct ListBase * list)

Finds the 'active' constraint in a constraint stack.

Definition at line 6020 of file constraint.cc.

References CONSTRAINT_ACTIVE, and LISTBASE_FOREACH.

Referenced by blender::ed::object::constraint_active_get().

◆ BKE_constraints_active_set()

void BKE_constraints_active_set ( ListBase * list,
struct bConstraint * con )

Set the given constraint as the active one (clearing all the others).

Definition at line 6036 of file constraint.cc.

References CONSTRAINT_ACTIVE, and LISTBASE_FOREACH.

Referenced by add_new_constraint_to_list(), blender::ed::object::constraint_active_set(), and blender::ed::outliner::constraint_fn().

◆ BKE_constraints_clear_evalob()

◆ BKE_constraints_copy()

void BKE_constraints_copy ( ListBase * dst,
const ListBase * src,
bool do_extern )

Definition at line 6008 of file constraint.cc.

References BKE_constraints_copy_ex().

◆ BKE_constraints_copy_ex()

void BKE_constraints_copy_ex ( ListBase * dst,
const ListBase * src,
const int flag,
bool do_extern )

◆ BKE_constraints_find_name()

bConstraint * BKE_constraints_find_name ( ListBase * list,
const char * name )

◆ BKE_constraints_free()

◆ BKE_constraints_free_ex()

void BKE_constraints_free_ex ( struct ListBase * list,
bool do_id_user )

Free all constraints from a constraint-stack.

Definition at line 5588 of file constraint.cc.

References BKE_constraint_free_data_ex(), BLI_freelistN(), and LISTBASE_FOREACH.

Referenced by BKE_constraints_free(), BKE_pose_channel_free_ex(), and object_free_data().

◆ BKE_constraints_id_loop()

void BKE_constraints_id_loop ( struct ListBase * list,
ConstraintIDFunc func,
const int flag,
void * userdata )

Run the given callback on all ID-blocks in list of constraints.

Parameters
flagthe IDWALK_ flags controlling the behavior of the foreach_id code, see BKE_lib_query.hh

Definition at line 5890 of file constraint.cc.

References BKE_constraint_typeinfo_get(), con_invoke_id_looper(), flag, and LISTBASE_FOREACH.

Referenced by blender::deg::DepsgraphNodeBuilder::build_object(), blender::deg::DepsgraphRelationBuilder::build_object(), blender::deg::DepsgraphNodeBuilder::build_pose_constraints(), blender::deg::DepsgraphRelationBuilder::build_rig(), and object_foreach_id().

◆ BKE_constraints_make_evalob()

◆ BKE_constraints_solve()

void BKE_constraints_solve ( struct Depsgraph * depsgraph,
struct ListBase * conlist,
struct bConstraintOb * cob,
float ctime )

◆ camerasolver_evaluate()

◆ camerasolver_id_looper()

void camerasolver_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 5217 of file constraint.cc.

References bConstraint::data, and data.

◆ camerasolver_new_data()

void camerasolver_new_data ( void * cdata)
static

Definition at line 5209 of file constraint.cc.

References CAMERASOLVER_ACTIVECLIP, and data.

◆ childof_evaluate()

◆ childof_flush_tars()

void childof_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 1014 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ childof_get_tars()

int childof_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 999 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ childof_id_looper()

void childof_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 991 of file constraint.cc.

References bConstraint::data, and data.

◆ childof_new_data()

void childof_new_data ( void * cdata)
static

◆ clamp_angle()

float clamp_angle ( const float angle,
const float min,
const float max )
static

Clamps an angle between min and max.

All angles are in radians.

This function treats angles as existing in a looping (cyclic) space, and is therefore specifically not equivalent to a simple clamp(angle, min, max). min and max are treated as a directed range on the unit circle and angle is treated as a point on the unit circle. angle is then clamped to be within the directed range defined by min and max.

Definition at line 1708 of file constraint.cc.

References angle(), M_PI, max, min, and wrap_rad_angle().

Referenced by rotlimit_evaluate().

◆ clampto_evaluate()

◆ clampto_flush_tars()

void clampto_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 3794 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGETNS_FLUSH_TARS.

◆ clampto_get_tarmat()

bool clampto_get_tarmat ( Depsgraph * ,
bConstraint * ,
bConstraintOb * ,
bConstraintTarget * ct,
float  )
static

Definition at line 3805 of file constraint.cc.

References unit_ct_matrix_nullsafe().

◆ clampto_get_tars()

int clampto_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 3779 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGETNS_GET_TARS.

◆ clampto_id_looper()

void clampto_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 3771 of file constraint.cc.

References bConstraint::data, and data.

◆ con_extern_cb()

void con_extern_cb ( bConstraint * ,
ID ** idpoin,
bool ,
void *  )
static

Definition at line 5907 of file constraint.cc.

References ID_IS_LINKED, and id_lib_extern().

Referenced by constraint_copy_data_ex().

◆ con_fix_copied_refs_cb()

void con_fix_copied_refs_cb ( bConstraint * ,
ID ** idpoin,
bool is_reference,
void *  )
static

Helper for BKE_constraints_copy(), to be used for making sure that user-counts of copied ID's are fixed up.

Definition at line 5921 of file constraint.cc.

References id_us_plus().

Referenced by constraint_copy_data_ex().

◆ con_invoke_id_looper()

void con_invoke_id_looper ( const bConstraintTypeInfo * cti,
bConstraint * con,
ConstraintIDFunc func,
const int flag,
void * userdata )
static

Helper function to invoke the id_looper callback, including custom space.

Definition at line 5544 of file constraint.cc.

References flag, bConstraintTypeInfo::id_looper, IDWALK_DO_DEPRECATED_POINTERS, and bConstraint::space_object.

Referenced by BKE_constraint_free_data_ex(), BKE_constraints_id_loop(), and constraint_copy_data_ex().

◆ con_unlink_refs_cb()

void con_unlink_refs_cb ( bConstraint * ,
ID ** idpoin,
bool is_reference,
void *  )
static

Helper function for BKE_constraint_free_data() - unlinks references.

Definition at line 5533 of file constraint.cc.

References id_us_min().

Referenced by BKE_constraint_free_data_ex().

◆ constraint_copy_data_ex()

void constraint_copy_data_ex ( bConstraint * dst,
bConstraint * src,
const int flag,
const bool do_extern )
static

◆ constraint_find_original()

◆ constraint_find_original_for_update()

◆ constraint_list_find_from_target()

bConstraint * constraint_list_find_from_target ( ListBase * constraints,
bConstraintTarget * tgt )
static

◆ constraint_remove()

bool constraint_remove ( ListBase * list,
bConstraint * con )
static

Definition at line 5604 of file constraint.cc.

References BKE_constraint_free_data(), and BLI_freelinkN().

Referenced by BKE_constraint_remove_ex().

◆ constraint_target_to_mat4()

◆ constraints_init_typeinfo()

◆ contarget_get_lattice_mat()

◆ contarget_get_mesh_mat()

◆ damptrack_do_transform()

◆ damptrack_evaluate()

void damptrack_evaluate ( bConstraint * con,
bConstraintOb * cob,
ListBase * targets )
static

◆ damptrack_flush_tars()

void damptrack_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 4432 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ damptrack_get_tars()

int damptrack_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 4417 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ damptrack_id_looper()

void damptrack_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 4409 of file constraint.cc.

References bConstraint::data, and data.

◆ damptrack_new_data()

void damptrack_new_data ( void * cdata)
static

Definition at line 4402 of file constraint.cc.

References data, and TRACK_Y.

◆ default_get_tarmat()

◆ default_get_tarmat_full_bbone()

◆ distlimit_evaluate()

◆ distlimit_flush_tars()

void distlimit_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 3319 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ distlimit_get_tars()

int distlimit_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 3304 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ distlimit_id_looper()

void distlimit_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 3296 of file constraint.cc.

References bConstraint::data, and data.

◆ distlimit_new_data()

void distlimit_new_data ( void * cdata)
static

Definition at line 3289 of file constraint.cc.

References data.

◆ followpath_evaluate()

◆ followpath_flush_tars()

void followpath_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 1494 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGETNS_FLUSH_TARS.

◆ followpath_get_tarmat()

◆ followpath_get_tars()

int followpath_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 1479 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGETNS_GET_TARS.

◆ followpath_id_looper()

void followpath_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 1471 of file constraint.cc.

References bConstraint::data, and data.

◆ followpath_new_data()

void followpath_new_data ( void * cdata)
static

Definition at line 1461 of file constraint.cc.

References data, TRACK_Y, and UP_Z.

◆ followtrack_camera_object_get()

Object * followtrack_camera_object_get ( bConstraint * con,
bConstraintOb * cob )
static

Definition at line 4833 of file constraint.cc.

References Scene::camera, bConstraint::data, data, and bConstraintOb::scene.

Referenced by followtrack_context_init().

◆ followtrack_context_init()

◆ followtrack_distance_from_viewplane_get()

float followtrack_distance_from_viewplane_get ( FollowTrackContext * context,
bConstraintOb * cob )
static

◆ followtrack_evaluate()

◆ followtrack_evaluate_using_2d_position()

◆ followtrack_evaluate_using_3d_position()

◆ followtrack_evaluate_using_3d_position_camera()

void followtrack_evaluate_using_3d_position_camera ( FollowTrackContext * context,
bConstraintOb * cob )
static

◆ followtrack_evaluate_using_3d_position_object()

◆ followtrack_fit_frame()

void followtrack_fit_frame ( FollowTrackContext * context,
const int clip_width,
const int clip_height,
float marker_position[2] )
static

◆ followtrack_id_looper()

void followtrack_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 4800 of file constraint.cc.

References bConstraint::data, and data.

◆ followtrack_new_data()

void followtrack_new_data ( void * cdata)
static

Definition at line 4792 of file constraint.cc.

References data, and FOLLOWTRACK_ACTIVECLIP.

◆ followtrack_project_to_depth_object_if_needed()

◆ followtrack_tracking_clip_get()

MovieClip * followtrack_tracking_clip_get ( bConstraint * con,
bConstraintOb * cob )
static

◆ followtrack_tracking_object_get()

◆ followtrack_undistort_if_needed()

void followtrack_undistort_if_needed ( FollowTrackContext * context,
const int clip_width,
const int clip_height,
float marker_position[2] )
static

◆ is_custom_space_needed()

◆ kinematic_flush_tars()

void kinematic_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 1389 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ kinematic_get_tarmat()

◆ kinematic_get_tars()

int kinematic_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 1373 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ kinematic_id_looper()

void kinematic_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 1362 of file constraint.cc.

References bConstraint::data, and data.

◆ kinematic_new_data()

void kinematic_new_data ( void * cdata)
static

Definition at line 1351 of file constraint.cc.

References CONSTRAINT_IK_POS, CONSTRAINT_IK_STRETCH, CONSTRAINT_IK_TIP, and data.

◆ locktrack_evaluate()

◆ locktrack_flush_tars()

void locktrack_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 3004 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ locktrack_get_tars()

int locktrack_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 2989 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ locktrack_id_looper()

void locktrack_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 2981 of file constraint.cc.

References bConstraint::data, and data.

◆ locktrack_new_data()

void locktrack_new_data ( void * cdata)
static

Definition at line 2973 of file constraint.cc.

References data, LOCK_Z, and TRACK_Y.

◆ loclike_evaluate()

◆ loclike_flush_tars()

void loclike_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 1922 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ loclike_get_tars()

int loclike_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 1907 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ loclike_id_looper()

void loclike_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 1899 of file constraint.cc.

References bConstraint::data, and data.

◆ loclike_new_data()

void loclike_new_data ( void * cdata)
static

Definition at line 1892 of file constraint.cc.

References data, LOCLIKE_X, LOCLIKE_Y, and LOCLIKE_Z.

◆ loclimit_evaluate()

void loclimit_evaluate ( bConstraint * con,
bConstraintOb * cob,
ListBase *  )
static

◆ minmax_evaluate()

◆ minmax_flush_tars()

void minmax_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 3672 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ minmax_get_tars()

int minmax_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 3657 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ minmax_id_looper()

void minmax_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 3649 of file constraint.cc.

References bConstraint::data, and data.

◆ minmax_new_data()

void minmax_new_data ( void * cdata)
static

Definition at line 3640 of file constraint.cc.

References data, and TRACK_Z.

◆ objectsolver_evaluate()

◆ objectsolver_id_looper()

void objectsolver_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 5276 of file constraint.cc.

References bConstraint::data, and data.

◆ objectsolver_new_data()

void objectsolver_new_data ( void * cdata)
static

Definition at line 5267 of file constraint.cc.

References data, OBJECTSOLVER_ACTIVECLIP, and unit_m4().

◆ pivotcon_evaluate()

◆ pivotcon_flush_tars()

void pivotcon_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 4686 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ pivotcon_get_tars()

int pivotcon_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 4671 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ pivotcon_id_looper()

void pivotcon_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 4663 of file constraint.cc.

References bConstraint::data, and data.

◆ rotlike_evaluate()

◆ rotlike_flush_tars()

void rotlike_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 2019 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ rotlike_get_tars()

int rotlike_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 2004 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ rotlike_id_looper()

void rotlike_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 1996 of file constraint.cc.

References bConstraint::data, and data.

◆ rotlike_new_data()

void rotlike_new_data ( void * cdata)
static

Definition at line 1989 of file constraint.cc.

References data, ROTLIKE_X, ROTLIKE_Y, and ROTLIKE_Z.

◆ rotlimit_evaluate()

◆ samevolume_evaluate()

◆ samevolume_new_data()

void samevolume_new_data ( void * cdata)
static

Definition at line 2402 of file constraint.cc.

References data, and SAMEVOL_Y.

◆ shrinkwrap_evaluate()

void shrinkwrap_evaluate ( bConstraint * ,
bConstraintOb * cob,
ListBase * targets )
static

◆ shrinkwrap_flush_tars()

void shrinkwrap_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 4195 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGETNS_FLUSH_TARS.

◆ shrinkwrap_get_tarmat()

bool shrinkwrap_get_tarmat ( Depsgraph * ,
bConstraint * con,
bConstraintOb * cob,
bConstraintTarget * ct,
float  )
static

Definition at line 4205 of file constraint.cc.

References BKE_constraint_mat_convertspace(), BKE_object_get_evaluated_mesh(), BKE_shrinkwrap_compute_smooth_normal(), BKE_shrinkwrap_find_nearest_surface(), BKE_shrinkwrap_free_tree(), BKE_shrinkwrap_init_tree(), BKE_shrinkwrap_project_normal(), BKE_shrinkwrap_snap_point_to_surface(), BLI_space_transform_apply(), BLI_space_transform_from_matrices(), BLI_space_transform_invert(), BLI_space_transform_invert_normal(), BVH_RAYCAST_DIST_MAX, BVHTreeNearest::co, BVHTreeRayHit::co, CON_SHRINKWRAP_PROJECT_CULL_MASK, CON_SHRINKWRAP_PROJECT_INVERT_CULL, CON_SHRINKWRAP_PROJECT_OPPOSITE, CON_SHRINKWRAP_TRACK_NORMAL, CONSTRAINT_SPACE_LOCAL, copy_m4_m4(), copy_v3_v3(), damptrack_do_transform(), bConstraint::data, bShrinkwrapConstraint::dist, BVHTreeRayHit::dist, BVHTreeNearest::dist_sq, bShrinkwrapConstraint::flag, FLT_MAX, BVHTreeNearest::index, BVHTreeRayHit::index, interp_v3_v3v3(), invert_m4(), len_v3v3(), bConstraintOb::matrix, bConstraintTarget::matrix, MOD_SHRINKWRAP_NEAREST_SURFACE, MOD_SHRINKWRAP_NEAREST_VERTEX, MOD_SHRINKWRAP_PROJECT, MOD_SHRINKWRAP_TARGET_PROJECT, mul_m4_v3(), mul_mat3_m4_v3(), negate_v3_v3(), BVHTreeNearest::no, BVHTreeRayHit::no, normalize_v3(), bConstraintOb::ob, OB_MESH, OB_NEGX, OB_NEGY, OB_NEGZ, OB_POSX, OB_POSY, OB_POSZ, bConstraintOb::pchan, bShrinkwrapConstraint::projAxis, bShrinkwrapConstraint::projAxisSpace, bShrinkwrapConstraint::projLimit, bShrinkwrapConstraint::shrinkMode, bShrinkwrapConstraint::shrinkType, bConstraintTarget::tar, bShrinkwrapConstraint::trackAxis, transform(), tree, Object::type, unit_m4(), VALID_CONS_TARGET, and zero_v3().

◆ shrinkwrap_get_tars()

int shrinkwrap_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 4181 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGETNS_GET_TARS.

◆ shrinkwrap_id_looper()

void shrinkwrap_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 4165 of file constraint.cc.

References bConstraint::data, and data.

◆ shrinkwrap_new_data()

void shrinkwrap_new_data ( void * cdata)
static

Definition at line 4173 of file constraint.cc.

References CONSTRAINT_SPACE_LOCAL, data, and OB_POSZ.

◆ sizelike_evaluate()

◆ sizelike_flush_tars()

void sizelike_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 2197 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ sizelike_get_tars()

int sizelike_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 2182 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ sizelike_id_looper()

void sizelike_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 2174 of file constraint.cc.

References bConstraint::data, and data.

◆ sizelike_new_data()

void sizelike_new_data ( void * cdata)
static

Definition at line 2166 of file constraint.cc.

References data, SIZELIKE_MULTIPLY, SIZELIKE_X, SIZELIKE_Y, and SIZELIKE_Z.

◆ sizelimit_evaluate()

◆ splineik_copy()

void splineik_copy ( bConstraint * con,
bConstraint * srccon )
static

Definition at line 4577 of file constraint.cc.

References bConstraint::data, MEM_dupallocN(), and bSplineIKConstraint::points.

◆ splineik_flush_tars()

void splineik_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 4622 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGETNS_FLUSH_TARS.

◆ splineik_free()

void splineik_free ( bConstraint * con)
static

Definition at line 4569 of file constraint.cc.

References bConstraint::data, data, and MEM_SAFE_FREE.

◆ splineik_get_tarmat()

bool splineik_get_tarmat ( Depsgraph * ,
bConstraint * ,
bConstraintOb * ,
bConstraintTarget * ct,
float  )
static

Definition at line 4633 of file constraint.cc.

References unit_ct_matrix_nullsafe().

◆ splineik_get_tars()

int splineik_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 4607 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGETNS_GET_TARS.

◆ splineik_id_looper()

void splineik_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 4599 of file constraint.cc.

References bConstraint::data, and data.

◆ splineik_new_data()

void splineik_new_data ( void * cdata)
static

◆ stretchto_evaluate()

◆ stretchto_flush_tars()

void stretchto_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 3466 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ stretchto_get_tars()

int stretchto_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 3451 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ stretchto_id_looper()

void stretchto_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 3443 of file constraint.cc.

References bConstraint::data, and data.

◆ stretchto_new_data()

void stretchto_new_data ( void * cdata)
static

Definition at line 3431 of file constraint.cc.

References data, and SWING_Y.

◆ trackto_evaluate()

◆ trackto_flush_tars()

void trackto_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 1194 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ trackto_get_tars()

int trackto_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 1179 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ trackto_id_looper()

void trackto_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 1171 of file constraint.cc.

References bConstraint::data, and data.

◆ trackto_new_data()

void trackto_new_data ( void * cdata)
static

Definition at line 1163 of file constraint.cc.

References data, TRACK_nZ, and UP_Y.

◆ transform_evaluate()

◆ transform_flush_tars()

void transform_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 3993 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ transform_get_tars()

int transform_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 3978 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ transform_id_looper()

void transform_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 3970 of file constraint.cc.

References bConstraint::data, and data.

◆ transform_new_data()

void transform_new_data ( void * cdata)
static

Definition at line 3956 of file constraint.cc.

References data, and i.

◆ transformcache_copy()

◆ transformcache_evaluate()

◆ transformcache_free()

void transformcache_free ( bConstraint * con)
static

Definition at line 5417 of file constraint.cc.

References BKE_cachefile_reader_free(), bConstraint::data, and data.

◆ transformcache_id_looper()

void transformcache_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 5353 of file constraint.cc.

References bConstraint::data, and data.

◆ transformcache_new_data()

void transformcache_new_data ( void * cdata)
static

Definition at line 5427 of file constraint.cc.

References data.

◆ translike_evaluate()

◆ translike_flush_tars()

void translike_flush_tars ( bConstraint * con,
ListBase * list,
bool no_copy )
static

Definition at line 2319 of file constraint.cc.

References bConstraint::data, data, ListBase::first, and SINGLETARGET_FLUSH_TARS.

◆ translike_get_tars()

int translike_get_tars ( bConstraint * con,
ListBase * list )
static

Definition at line 2304 of file constraint.cc.

References bConstraint::data, data, and SINGLETARGET_GET_TARS.

◆ translike_id_looper()

void translike_id_looper ( bConstraint * con,
ConstraintIDFunc func,
void * userdata )
static

Definition at line 2296 of file constraint.cc.

References bConstraint::data, and data.

◆ unit_ct_matrix_nullsafe()

◆ vectomat()

void vectomat ( const float vec[3],
const float target_up[3],
short axis,
short upflag,
short flags,
float m[3][3] )
static

◆ wrap_rad_angle()

float wrap_rad_angle ( const float angle)
inlinestatic

Wraps a number to be in [-PI, +PI].

Definition at line 1692 of file constraint.cc.

References angle(), b, and M_PI.

Referenced by clamp_angle().

Variable Documentation

◆ constraintsTypeInfo

bConstraintTypeInfo* constraintsTypeInfo[NUM_CONSTRAINT_TYPES]
static

Definition at line 5455 of file constraint.cc.

Referenced by BKE_constraint_typeinfo_from_type(), and constraints_init_typeinfo().

◆ CTI_ACTION

bConstraintTypeInfo CTI_ACTION
static
Initial value:
= {
N_("Action"),
"bActionConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_ACTION
static bool actcon_get_tarmat(Depsgraph *depsgraph, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void actcon_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void actcon_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void actcon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static int actcon_get_tars(bConstraint *con, ListBase *list)
static void actcon_new_data(void *cdata)
#define N_(msgid)

Definition at line 2956 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_ARMATURE

bConstraintTypeInfo CTI_ARMATURE
static
Initial value:
= {
N_("Armature"),
"bArmatureConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_ARMATURE
static bool armdef_get_tarmat(Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void armdef_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void armdef_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void armdef_copy(bConstraint *con, bConstraint *srccon)
static int armdef_get_tars(bConstraint *con, ListBase *list)
static void armdef_free(bConstraint *con)

Definition at line 2703 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_CAMERASOLVER

bConstraintTypeInfo CTI_CAMERASOLVER
static
Initial value:
= {
N_("Camera Solver"),
"bCameraSolverConstraint",
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_CAMERASOLVER
static void camerasolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)
static void camerasolver_new_data(void *cdata)
static void camerasolver_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 5250 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_CHILDOF

bConstraintTypeInfo CTI_CHILDOF
static
Initial value:
= {
N_("Child Of"),
"bChildOfConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_CHILDOF
static bool default_get_tarmat(Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void childof_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void childof_new_data(void *cdata)
static int childof_get_tars(bConstraint *con, ListBase *list)
static void childof_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void childof_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 1146 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_CLAMPTO

bConstraintTypeInfo CTI_CLAMPTO
static
Initial value:
= {
N_("Clamp To"),
"bClampToConstraint",
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_CLAMPTO
static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static bool clampto_get_tarmat(Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void clampto_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static int clampto_get_tars(bConstraint *con, ListBase *list)
static void clampto_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 3939 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_DAMPTRACK

bConstraintTypeInfo CTI_DAMPTRACK
static
Initial value:
= {
N_("Damped Track"),
"bDampTrackConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_DAMPTRACK
static int damptrack_get_tars(bConstraint *con, ListBase *list)
static void damptrack_new_data(void *cdata)
static void damptrack_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void damptrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void damptrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 4552 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_DISTLIMIT

bConstraintTypeInfo CTI_DISTLIMIT
static
Initial value:
= {
N_("Limit Distance"),
"bDistLimitConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_DISTLIMIT
static void distlimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void distlimit_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static int distlimit_get_tars(bConstraint *con, ListBase *list)
static void distlimit_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void distlimit_new_data(void *cdata)

Definition at line 3414 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_FOLLOWPATH

bConstraintTypeInfo CTI_FOLLOWPATH
static
Initial value:
= {
N_("Follow Path"),
"bFollowPathConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_FOLLOWPATH
static int followpath_get_tars(bConstraint *con, ListBase *list)
static void followpath_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void followpath_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void followpath_new_data(void *cdata)
static bool followpath_get_tarmat(Depsgraph *, bConstraint *con, bConstraintOb *, bConstraintTarget *ct, float)
static void followpath_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 1631 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_FOLLOWTRACK

bConstraintTypeInfo CTI_FOLLOWTRACK
static
Initial value:
= {
N_("Follow Track"),
"bFollowTrackConstraint",
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_FOLLOWTRACK
static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)
static void followtrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void followtrack_new_data(void *cdata)

Definition at line 5192 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_INIT

short CTI_INIT = 1
static

Definition at line 5456 of file constraint.cc.

Referenced by BKE_constraint_typeinfo_from_type().

◆ CTI_KINEMATIC

bConstraintTypeInfo CTI_KINEMATIC
static
Initial value:
= {
N_("IK"),
"bKinematicConstraint",
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_KINEMATIC
static int kinematic_get_tars(bConstraint *con, ListBase *list)
static void kinematic_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static bool kinematic_get_tarmat(Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void kinematic_new_data(void *cdata)
static void kinematic_flush_tars(bConstraint *con, ListBase *list, bool no_copy)

Definition at line 1444 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_LOCKTRACK

bConstraintTypeInfo CTI_LOCKTRACK
static
Initial value:
= {
N_("Locked Track"),
"bLockTrackConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_LOCKTRACK
static void locktrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void locktrack_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void locktrack_new_data(void *cdata)
static int locktrack_get_tars(bConstraint *con, ListBase *list)
static void locktrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 3272 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_LOCLIKE

bConstraintTypeInfo CTI_LOCLIKE
static
Initial value:
= {
N_("Copy Location"),
"bLocateLikeConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_LOCLIKE
static void loclike_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static int loclike_get_tars(bConstraint *con, ListBase *list)
static void loclike_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void loclike_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void loclike_new_data(void *cdata)

Definition at line 1972 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_LOCLIMIT

bConstraintTypeInfo CTI_LOCLIMIT
static
Initial value:
= {
N_("Limit Location"),
"bLocLimitConstraint",
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_LOCLIMIT
static void loclimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)

Definition at line 1672 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_MINMAX

bConstraintTypeInfo CTI_MINMAX
static
Initial value:
= {
N_("Floor"),
"bMinMaxConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_MINMAX
static void minmax_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void minmax_new_data(void *cdata)
static void minmax_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static int minmax_get_tars(bConstraint *con, ListBase *list)
static void minmax_flush_tars(bConstraint *con, ListBase *list, bool no_copy)

Definition at line 3754 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_OBJECTSOLVER

bConstraintTypeInfo CTI_OBJECTSOLVER
static
Initial value:
= {
N_("Object Solver"),
"bObjectSolverConstraint",
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_OBJECTSOLVER
static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)
static void objectsolver_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void objectsolver_new_data(void *cdata)

Definition at line 5336 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_PIVOT

bConstraintTypeInfo CTI_PIVOT
static
Initial value:
= {
N_("Pivot"),
"bPivotConstraint",
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_PIVOT
static void pivotcon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static int pivotcon_get_tars(bConstraint *con, ListBase *list)
static void pivotcon_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void pivotcon_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 4774 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_ROTLIKE

bConstraintTypeInfo CTI_ROTLIKE
static
Initial value:
= {
N_("Copy Rotation"),
"bRotateLikeConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_ROTLIKE
static void rotlike_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void rotlike_new_data(void *cdata)
static void rotlike_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static int rotlike_get_tars(bConstraint *con, ListBase *list)
static void rotlike_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 2149 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_ROTLIMIT

bConstraintTypeInfo CTI_ROTLIMIT
static
Initial value:
= {
N_("Limit Rotation"),
"bRotLimitConstraint",
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_ROTLIMIT
static void rotlimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)

Definition at line 1819 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_SAMEVOL

bConstraintTypeInfo CTI_SAMEVOL
static
Initial value:
= {
N_("Maintain Volume"),
"bSameVolumeConstraint",
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_SAMEVOL
static void samevolume_new_data(void *cdata)
static void samevolume_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)

Definition at line 2454 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_SHRINKWRAP

bConstraintTypeInfo CTI_SHRINKWRAP
static
Initial value:
= {
N_("Shrinkwrap"),
"bShrinkwrapConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_SHRINKWRAP
static void shrinkwrap_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void shrinkwrap_new_data(void *cdata)
static void shrinkwrap_evaluate(bConstraint *, bConstraintOb *cob, ListBase *targets)
static void shrinkwrap_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static bool shrinkwrap_get_tarmat(Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static int shrinkwrap_get_tars(bConstraint *con, ListBase *list)

Definition at line 4385 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_SIZELIKE

bConstraintTypeInfo CTI_SIZELIKE
static
Initial value:
= {
N_("Copy Scale"),
"bSizeLikeConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_SIZELIKE
static void sizelike_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void sizelike_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void sizelike_new_data(void *cdata)
static int sizelike_get_tars(bConstraint *con, ListBase *list)
static void sizelike_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)

Definition at line 2279 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_SIZELIMIT

bConstraintTypeInfo CTI_SIZELIMIT
static
Initial value:
= {
N_("Limit Scale"),
"bSizeLimitConstraint",
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_SIZELIMIT
static void sizelimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)

Definition at line 1875 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_SPLINEIK

bConstraintTypeInfo CTI_SPLINEIK
static
Initial value:
= {
N_("Spline IK"),
"bSplineIKConstraint",
nullptr,
}
@ CONSTRAINT_TYPE_SPLINEIK
static bool splineik_get_tarmat(Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void splineik_copy(bConstraint *con, bConstraint *srccon)
static int splineik_get_tars(bConstraint *con, ListBase *list)
static void splineik_new_data(void *cdata)
static void splineik_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void splineik_free(bConstraint *con)
static void splineik_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 4646 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_STRETCHTO

bConstraintTypeInfo CTI_STRETCHTO
static
Initial value:
= {
N_("Stretch To"),
"bStretchToConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_STRETCHTO
static void stretchto_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void stretchto_new_data(void *cdata)
static int stretchto_get_tars(bConstraint *con, ListBase *list)
static void stretchto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void stretchto_flush_tars(bConstraint *con, ListBase *list, bool no_copy)

Definition at line 3623 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_TRACKTO

bConstraintTypeInfo CTI_TRACKTO
static
Initial value:
= {
N_("Track To"),
"bTrackToConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_TRACKTO
static void trackto_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void trackto_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void trackto_new_data(void *cdata)
static void trackto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static int trackto_get_tars(bConstraint *con, ListBase *list)

Definition at line 1334 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_TRANSFORM

bConstraintTypeInfo CTI_TRANSFORM
static
Initial value:
= {
N_("Transformation"),
"bTransformConstraint",
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_TRANSFORM
static void transform_new_data(void *cdata)
static void transform_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void transform_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static int transform_get_tars(bConstraint *con, ListBase *list)
static void transform_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 4148 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_TRANSFORM_CACHE

bConstraintTypeInfo CTI_TRANSFORM_CACHE
static
Initial value:
= {
N_("Transform Cache"),
"bTransformCacheConstraint",
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_TRANSFORM_CACHE
static void transformcache_new_data(void *cdata)
static void transformcache_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void transformcache_copy(bConstraint *con, bConstraint *srccon)
static void transformcache_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void transformcache_free(bConstraint *con)

Definition at line 5434 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_TRANSLIKE

bConstraintTypeInfo CTI_TRANSLIKE
static
Initial value:
= {
N_("Copy Transforms"),
"bTransLikeConstraint",
nullptr,
nullptr,
nullptr,
}
@ CONSTRAINT_TYPE_TRANSLIKE
static void translike_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static int translike_get_tars(bConstraint *con, ListBase *list)
static bool default_get_tarmat_full_bbone(Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void translike_flush_tars(bConstraint *con, ListBase *list, bool no_copy)
static void translike_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)

Definition at line 2385 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ LOG

CLG_LogRef LOG = {"bke.constraint"}
static

Definition at line 103 of file constraint.cc.

◆ track_dir_vecs

const float track_dir_vecs[6][3]
static
Initial value:
= {
{+1, 0, 0},
{0, +1, 0},
{0, 0, +1},
{-1, 0, 0},
{0, -1, 0},
{0, 0, -1}
}

Definition at line 4444 of file constraint.cc.

Referenced by damptrack_do_transform().