Blender V4.3
constraint.cc File Reference
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <cstddef>
#include <cstdio>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_kdopbvh.h"
#include "BLI_listbase.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.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_mesh.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 "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "BLO_read_write.hh"
#include "ANIM_action.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)   ((ct) && (ct->tar))
 
#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 default_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
 
static void 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 void 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 void 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 pycon_free (bConstraint *con)
 
static void pycon_copy (bConstraint *con, bConstraint *srccon)
 
static void pycon_new_data (void *cdata)
 
static int pycon_get_tars (bConstraint *con, ListBase *list)
 
static void pycon_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
 
static void pycon_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
 
static void pycon_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *targets)
 
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 void 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 void 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 void 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 void 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 void 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)
 
bool BKE_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_PYTHON
 
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 927 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 = static_cast<bConstraintTarget *>( \
MEM_callocN(sizeof(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)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int

Definition at line 869 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 949 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 = static_cast<bConstraintTarget *>( \
MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget")); \
\
ct->tar = datatar; \
ct->space = con->tarspace; \
\
if (ct->tar) { \
} \
BLI_addtail(list, ct); \
} \
(void)0

Definition at line 905 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()

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

Definition at line 2894 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ actcon_get_tarmat()

◆ actcon_get_tars()

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

Definition at line 2879 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ actcon_id_looper()

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

Definition at line 2868 of file constraint.cc.

References bConstraint::data.

◆ actcon_new_data()

static void actcon_new_data ( void * cdata)
static

Definition at line 2857 of file constraint.cc.

References ACTCON_MIX_AFTER, and bActionConstraint::type.

◆ add_new_constraint()

◆ add_new_constraint_internal()

◆ add_new_constraint_to_list()

◆ armdef_accumulate_bone()

◆ armdef_accumulate_matrix()

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

◆ armdef_copy()

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

◆ armdef_evaluate()

◆ armdef_free()

static void armdef_free ( bConstraint * con)
static

Definition at line 2607 of file constraint.cc.

References BLI_freelistN(), and bConstraint::data.

◆ armdef_get_tarmat()

◆ armdef_get_tars()

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

◆ armdef_id_looper()

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

Definition at line 2636 of file constraint.cc.

References bConstraint::data, and LISTBASE_FOREACH.

◆ basis_cross()

static int basis_cross ( int n,
int m )
static

Definition at line 1195 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 5992 of file constraint.cc.

References add_new_constraint().

Referenced by 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 6084 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 6192 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 5684 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()

bool BKE_constraint_remove ( ListBase * list,
struct bConstraint * con )

Remove the specified constraint from the given constraint stack.

Definition at line 5727 of file constraint.cc.

References BKE_constraint_free_data(), and BLI_freelinkN().

Referenced by BKE_constraint_remove_ex(), blender::ed::object::object_track_clear_exec(), and blender::ed::object::pose_ik_clear_exec().

◆ 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 6354 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, scene, bConstraintOb::startmat, bConstraintOb::type, and unit_m4().

Referenced by base_callback(), execute_posetree(), blender::ed::object::parent_set(), 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()

const bConstraintTypeInfo * BKE_constraint_typeinfo_from_type ( int type)

This function should be used for getting the appropriate type-info when only a constraint type is known.

Definition at line 5617 of file constraint.cc.

References CLOG_WARN, CONSTRAINT_TYPE_NULL, constraints_init_typeinfo(), constraintsTypeInfo, CTI_INIT, LOG, and NUM_CONSTRAINT_TYPES.

Referenced by add_new_constraint_internal(), BKE_constraint_typeinfo_get(), bone_constraint_panel_id(), constraintRotLim(), constraintSizeLim(), constraintTransLim(), and object_constraint_panel_id().

◆ 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 120 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 6141 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 6157 of file constraint.cc.

References CONSTRAINT_ACTIVE, bConstraint::flag, 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 6129 of file constraint.cc.

References BKE_constraints_copy_ex().

◆ BKE_constraints_copy_ex()

◆ 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 5711 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 6011 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()

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

Definition at line 5340 of file constraint.cc.

References bConstraint::data.

◆ camerasolver_new_data()

static void camerasolver_new_data ( void * cdata)
static

◆ childof_evaluate()

◆ childof_flush_tars()

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

Definition at line 1004 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ childof_get_tars()

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

Definition at line 989 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ childof_id_looper()

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

Definition at line 981 of file constraint.cc.

References bConstraint::data.

◆ childof_new_data()

static void childof_new_data ( void * cdata)
static

◆ clamp_angle()

static 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 1700 of file constraint.cc.

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

Referenced by rotlimit_evaluate().

◆ clampto_evaluate()

◆ clampto_flush_tars()

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

Definition at line 3919 of file constraint.cc.

References bConstraint::data, and SINGLETARGETNS_FLUSH_TARS.

◆ clampto_get_tarmat()

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

Definition at line 3930 of file constraint.cc.

References bConstraintTarget::matrix, and unit_m4().

◆ clampto_get_tars()

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

Definition at line 3904 of file constraint.cc.

References bConstraint::data, and SINGLETARGETNS_GET_TARS.

◆ clampto_id_looper()

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

Definition at line 3896 of file constraint.cc.

References bConstraint::data.

◆ con_extern_cb()

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

Definition at line 6028 of file constraint.cc.

References ID_IS_LINKED, and id_lib_extern().

Referenced by constraint_copy_data_ex().

◆ con_fix_copied_refs_cb()

static 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 6042 of file constraint.cc.

References id_us_plus().

Referenced by constraint_copy_data_ex().

◆ con_invoke_id_looper()

static 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 5667 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()

static 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 5656 of file constraint.cc.

References id_us_min().

Referenced by BKE_constraint_free_data_ex().

◆ constraint_copy_data_ex()

static 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()

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

◆ constraint_target_to_mat4()

◆ constraints_init_typeinfo()

◆ contarget_get_lattice_mat()

◆ contarget_get_mesh_mat()

◆ damptrack_do_transform()

◆ damptrack_evaluate()

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

◆ damptrack_flush_tars()

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

Definition at line 4553 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ damptrack_get_tars()

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

Definition at line 4538 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ damptrack_id_looper()

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

Definition at line 4530 of file constraint.cc.

References bConstraint::data.

◆ damptrack_new_data()

static void damptrack_new_data ( void * cdata)
static

Definition at line 4523 of file constraint.cc.

References TRACK_Y, and bDampTrackConstraint::trackflag.

◆ default_get_tarmat()

◆ default_get_tarmat_full_bbone()

◆ distlimit_evaluate()

◆ distlimit_flush_tars()

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

Definition at line 3445 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ distlimit_get_tars()

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

Definition at line 3430 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ distlimit_id_looper()

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

Definition at line 3422 of file constraint.cc.

References bConstraint::data.

◆ distlimit_new_data()

static void distlimit_new_data ( void * cdata)
static

Definition at line 3415 of file constraint.cc.

References bDistLimitConstraint::dist.

◆ followpath_evaluate()

◆ followpath_flush_tars()

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

Definition at line 1480 of file constraint.cc.

References bConstraint::data, and SINGLETARGETNS_FLUSH_TARS.

◆ followpath_get_tarmat()

◆ followpath_get_tars()

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

Definition at line 1465 of file constraint.cc.

References bConstraint::data, and SINGLETARGETNS_GET_TARS.

◆ followpath_id_looper()

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

Definition at line 1457 of file constraint.cc.

References bConstraint::data.

◆ followpath_new_data()

static void followpath_new_data ( void * cdata)
static

Definition at line 1447 of file constraint.cc.

References TRACK_Y, bFollowPathConstraint::trackflag, and UP_Z.

◆ followtrack_camera_object_get()

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

Definition at line 4953 of file constraint.cc.

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

Referenced by followtrack_context_init().

◆ followtrack_context_init()

◆ followtrack_distance_from_viewplane_get()

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

◆ followtrack_evaluate()

◆ followtrack_evaluate_using_2d_position()

◆ followtrack_evaluate_using_3d_position()

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

◆ followtrack_evaluate_using_3d_position_camera()

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

◆ followtrack_evaluate_using_3d_position_object()

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

◆ followtrack_fit_frame()

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

◆ followtrack_id_looper()

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

Definition at line 4920 of file constraint.cc.

References bConstraint::data.

◆ followtrack_new_data()

static void followtrack_new_data ( void * cdata)
static

◆ followtrack_project_to_depth_object_if_needed()

◆ followtrack_tracking_clip_get()

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

◆ followtrack_tracking_object_get()

static MovieTrackingObject * followtrack_tracking_object_get ( bConstraint * con,
bConstraintOb * cob )
static

◆ followtrack_undistort_if_needed()

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

◆ is_custom_space_needed()

static bool is_custom_space_needed ( bConstraint * con)
static

◆ kinematic_flush_tars()

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

Definition at line 1379 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ kinematic_get_tarmat()

◆ kinematic_get_tars()

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

Definition at line 1363 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ kinematic_id_looper()

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

Definition at line 1352 of file constraint.cc.

References bConstraint::data.

◆ kinematic_new_data()

static void kinematic_new_data ( void * cdata)
static

◆ locktrack_evaluate()

◆ locktrack_flush_tars()

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

Definition at line 3130 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ locktrack_get_tars()

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

Definition at line 3115 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ locktrack_id_looper()

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

Definition at line 3107 of file constraint.cc.

References bConstraint::data.

◆ locktrack_new_data()

static void locktrack_new_data ( void * cdata)
static

Definition at line 3099 of file constraint.cc.

References LOCK_Z, TRACK_Y, and bLockTrackConstraint::trackflag.

◆ loclike_evaluate()

◆ loclike_flush_tars()

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

Definition at line 1926 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ loclike_get_tars()

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

Definition at line 1911 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ loclike_id_looper()

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

Definition at line 1903 of file constraint.cc.

References bConstraint::data.

◆ loclike_new_data()

static void loclike_new_data ( void * cdata)
static

Definition at line 1896 of file constraint.cc.

References bLocateLikeConstraint::flag, LOCLIKE_X, LOCLIKE_Y, and LOCLIKE_Z.

◆ loclimit_evaluate()

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

◆ minmax_evaluate()

◆ minmax_flush_tars()

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

Definition at line 3797 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ minmax_get_tars()

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

Definition at line 3782 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ minmax_id_looper()

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

Definition at line 3774 of file constraint.cc.

References bConstraint::data.

◆ minmax_new_data()

static void minmax_new_data ( void * cdata)
static

Definition at line 3765 of file constraint.cc.

References bMinMaxConstraint::minmaxflag, and TRACK_Z.

◆ objectsolver_evaluate()

◆ objectsolver_id_looper()

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

Definition at line 5399 of file constraint.cc.

References bConstraint::data.

◆ objectsolver_new_data()

static void objectsolver_new_data ( void * cdata)
static

◆ pivotcon_evaluate()

◆ pivotcon_flush_tars()

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

Definition at line 4806 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ pivotcon_get_tars()

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

Definition at line 4791 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ pivotcon_id_looper()

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

Definition at line 4783 of file constraint.cc.

References bConstraint::data.

◆ pycon_copy()

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

◆ pycon_evaluate()

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

◆ pycon_free()

static void pycon_free ( bConstraint * con)
static

Definition at line 2475 of file constraint.cc.

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

◆ pycon_get_tarmat()

◆ pycon_get_tars()

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

Definition at line 2504 of file constraint.cc.

References bConstraint::data, ListBase::first, and bPythonConstraint::targets.

◆ pycon_id_looper()

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

Definition at line 2518 of file constraint.cc.

References bConstraint::data, and LISTBASE_FOREACH.

◆ pycon_new_data()

static void pycon_new_data ( void * cdata)
static

Definition at line 2495 of file constraint.cc.

References IDP_GROUP, MEM_callocN, bPythonConstraint::prop, and IDProperty::type.

◆ rotlike_evaluate()

◆ rotlike_flush_tars()

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

Definition at line 2023 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ rotlike_get_tars()

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

Definition at line 2008 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ rotlike_id_looper()

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

Definition at line 2000 of file constraint.cc.

References bConstraint::data.

◆ rotlike_new_data()

static void rotlike_new_data ( void * cdata)
static

Definition at line 1993 of file constraint.cc.

References bRotateLikeConstraint::flag, ROTLIKE_X, ROTLIKE_Y, and ROTLIKE_Z.

◆ rotlimit_evaluate()

◆ samevolume_evaluate()

◆ samevolume_new_data()

static void samevolume_new_data ( void * cdata)
static

Definition at line 2406 of file constraint.cc.

References bSameVolumeConstraint::free_axis, and SAMEVOL_Y.

◆ shrinkwrap_evaluate()

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

◆ shrinkwrap_flush_tars()

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

Definition at line 4321 of file constraint.cc.

References bConstraint::data, and SINGLETARGETNS_FLUSH_TARS.

◆ shrinkwrap_get_tarmat()

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

Definition at line 4331 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, 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, 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(), 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()

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

Definition at line 4307 of file constraint.cc.

References bConstraint::data, and SINGLETARGETNS_GET_TARS.

◆ shrinkwrap_id_looper()

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

Definition at line 4291 of file constraint.cc.

References bConstraint::data.

◆ shrinkwrap_new_data()

static void shrinkwrap_new_data ( void * cdata)
static

Definition at line 4299 of file constraint.cc.

References CONSTRAINT_SPACE_LOCAL, OB_POSZ, and bShrinkwrapConstraint::projAxis.

◆ sizelike_evaluate()

◆ sizelike_flush_tars()

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

Definition at line 2201 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ sizelike_get_tars()

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

Definition at line 2186 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ sizelike_id_looper()

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

Definition at line 2178 of file constraint.cc.

References bConstraint::data.

◆ sizelike_new_data()

static void sizelike_new_data ( void * cdata)
static

◆ sizelimit_evaluate()

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

◆ splineik_copy()

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

Definition at line 4696 of file constraint.cc.

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

◆ splineik_flush_tars()

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

Definition at line 4741 of file constraint.cc.

References bConstraint::data, and SINGLETARGETNS_FLUSH_TARS.

◆ splineik_free()

static void splineik_free ( bConstraint * con)
static

Definition at line 4688 of file constraint.cc.

References bConstraint::data, and MEM_SAFE_FREE.

◆ splineik_get_tarmat()

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

Definition at line 4752 of file constraint.cc.

References bConstraintTarget::matrix, and unit_m4().

◆ splineik_get_tars()

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

Definition at line 4726 of file constraint.cc.

References bConstraint::data, and SINGLETARGETNS_GET_TARS.

◆ splineik_id_looper()

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

Definition at line 4718 of file constraint.cc.

References bConstraint::data.

◆ splineik_new_data()

static void splineik_new_data ( void * cdata)
static

◆ stretchto_evaluate()

◆ stretchto_flush_tars()

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

Definition at line 3592 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ stretchto_get_tars()

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

Definition at line 3577 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ stretchto_id_looper()

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

Definition at line 3569 of file constraint.cc.

References bConstraint::data.

◆ stretchto_new_data()

static void stretchto_new_data ( void * cdata)
static

Definition at line 3557 of file constraint.cc.

References SWING_Y, and bStretchToConstraint::volmode.

◆ trackto_evaluate()

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

◆ trackto_flush_tars()

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

Definition at line 1184 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ trackto_get_tars()

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

Definition at line 1169 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ trackto_id_looper()

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

Definition at line 1161 of file constraint.cc.

References bConstraint::data.

◆ trackto_new_data()

static void trackto_new_data ( void * cdata)
static

Definition at line 1153 of file constraint.cc.

References bTrackToConstraint::reserved1, TRACK_nZ, and UP_Y.

◆ transform_evaluate()

◆ transform_flush_tars()

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

Definition at line 4119 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ transform_get_tars()

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

Definition at line 4104 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ transform_id_looper()

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

Definition at line 4096 of file constraint.cc.

References bConstraint::data.

◆ transform_new_data()

static void transform_new_data ( void * cdata)
static

Definition at line 4082 of file constraint.cc.

References bTransformConstraint::map.

◆ transformcache_copy()

◆ transformcache_evaluate()

◆ transformcache_free()

static void transformcache_free ( bConstraint * con)
static

Definition at line 5540 of file constraint.cc.

References BKE_cachefile_reader_free(), and bConstraint::data.

◆ transformcache_id_looper()

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

Definition at line 5476 of file constraint.cc.

References bConstraint::data.

◆ transformcache_new_data()

static void transformcache_new_data ( void * cdata)
static

Definition at line 5550 of file constraint.cc.

References bTransformCacheConstraint::cache_file.

◆ translike_evaluate()

◆ translike_flush_tars()

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

Definition at line 2323 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_FLUSH_TARS.

◆ translike_get_tars()

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

Definition at line 2308 of file constraint.cc.

References bConstraint::data, and SINGLETARGET_GET_TARS.

◆ translike_id_looper()

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

Definition at line 2300 of file constraint.cc.

References bConstraint::data.

◆ vectomat()

static 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()

static float wrap_rad_angle ( const float angle)
inlinestatic

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

Definition at line 1684 of file constraint.cc.

References b, and M_PI.

Referenced by clamp_angle().

Variable Documentation

◆ constraintsTypeInfo

bConstraintTypeInfo* constraintsTypeInfo[NUM_CONSTRAINT_TYPES]
static

Definition at line 5578 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,
}
struct bActionConstraint bActionConstraint
@ CONSTRAINT_TYPE_ACTION
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_get_tarmat(Depsgraph *depsgraph, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
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 3082 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
struct bArmatureConstraint bArmatureConstraint
static void 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 2840 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
struct bCameraSolverConstraint bCameraSolverConstraint
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 5373 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
struct bChildOfConstraint bChildOfConstraint
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)
static void default_get_tarmat(Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)

Definition at line 1136 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
struct bClampToConstraint bClampToConstraint
static void clampto_get_tarmat(Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
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 4065 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
struct bDampTrackConstraint bDampTrackConstraint
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 4671 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
struct bDistLimitConstraint bDistLimitConstraint
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 3540 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
struct bFollowPathConstraint bFollowPathConstraint
static void followpath_get_tarmat(Depsgraph *, bConstraint *con, bConstraintOb *, bConstraintTarget *ct, float)
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 void followpath_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)

Definition at line 1611 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,
}
struct bFollowTrackConstraint bFollowTrackConstraint
@ 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 5315 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_INIT

short CTI_INIT = 1
static

Definition at line 5579 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
struct bKinematicConstraint bKinematicConstraint
static int kinematic_get_tars(bConstraint *con, ListBase *list)
static void kinematic_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void kinematic_new_data(void *cdata)
static void kinematic_get_tarmat(Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void kinematic_flush_tars(bConstraint *con, ListBase *list, bool no_copy)

Definition at line 1430 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
struct bLockTrackConstraint bLockTrackConstraint
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 3398 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
struct bLocateLikeConstraint bLocateLikeConstraint
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 1976 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
struct bLocLimitConstraint bLocLimitConstraint
static void loclimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)

Definition at line 1664 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
struct bMinMaxConstraint bMinMaxConstraint
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 3879 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
struct bObjectSolverConstraint bObjectSolverConstraint
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 5459 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
struct bPivotConstraint bPivotConstraint
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 4894 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_PYTHON

bConstraintTypeInfo CTI_PYTHON
static
Initial value:
= {
N_("Script"),
"bPythonConstraint",
nullptr,
}
@ CONSTRAINT_TYPE_PYTHON
struct bPythonConstraint bPythonConstraint
static void pycon_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static int pycon_get_tars(bConstraint *con, ListBase *list)
static void pycon_new_data(void *cdata)
static void pycon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targets)
static void pycon_get_tarmat(Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void pycon_copy(bConstraint *con, bConstraint *srccon)
static void pycon_free(bConstraint *con)

Definition at line 2590 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
struct bRotateLikeConstraint bRotateLikeConstraint
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 2153 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
struct bRotLimitConstraint bRotLimitConstraint
static void rotlimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)

Definition at line 1811 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
struct bSameVolumeConstraint bSameVolumeConstraint
static void samevolume_new_data(void *cdata)
static void samevolume_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)

Definition at line 2458 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
struct bShrinkwrapConstraint bShrinkwrapConstraint
static void shrinkwrap_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void shrinkwrap_get_tarmat(Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
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 int shrinkwrap_get_tars(bConstraint *con, ListBase *list)

Definition at line 4506 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
struct bSizeLikeConstraint bSizeLikeConstraint
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 2283 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
struct bSizeLimitConstraint bSizeLimitConstraint
static void sizelimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *)

Definition at line 1879 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
struct bSplineIKConstraint bSplineIKConstraint
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_get_tarmat(Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
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 4766 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ CTI_STRETCHTO

bConstraintTypeInfo CTI_STRETCHTO
static
Initial value:
= {
N_("Stretch To"),
"bStretchToConstraint",
nullptr,
nullptr,
}
struct bStretchToConstraint bStretchToConstraint
@ 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 3748 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
struct bTrackToConstraint bTrackToConstraint
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 1324 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
struct bTransformConstraint bTransformConstraint
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 4274 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
struct bTransformCacheConstraint bTransformCacheConstraint
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 5557 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
struct bTransLikeConstraint bTransLikeConstraint
static void translike_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata)
static void default_get_tarmat_full_bbone(Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
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)

Definition at line 2389 of file constraint.cc.

Referenced by constraints_init_typeinfo().

◆ LOG

CLG_LogRef LOG = {"bke.constraint"}
static

Definition at line 102 of file constraint.cc.

Referenced by BKE_constraint_typeinfo_from_type().

◆ 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 4565 of file constraint.cc.

Referenced by damptrack_do_transform().