Blender V5.3
constraint.cc File Reference
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <cstddef>
#include <cstdio>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "BLI_assert.hh"
#include "BLI_kdopbvh.hh"
#include "BLI_listbase.hh"
#include "BLI_math_matrix_c.hh"
#include "BLI_math_quaternion.hh"
#include "BLI_math_rotation_c.hh"
#include "BLI_math_vector.hh"
#include "BLI_math_vector_c.hh"
#include "BLI_string.hh"
#include "BLI_string_utf8.hh"
#include "BLI_string_utils.hh"
#include "BLI_utildefines.hh"
#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.hh"
#include "BKE_armature.hh"
#include "BKE_bvh.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_geometry_set_instances.hh"
#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_wrapper.hh"
#include "BKE_movieclip.hh"
#include "BKE_object.hh"
#include "BKE_object_types.hh"
#include "BKE_pose.hh"
#include "BKE_scene.hh"
#include "BKE_shrinkwrap.hh"
#include "BKE_tracking.hh"
#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  blender::FollowTrackContext

Namespaces

namespace  blender
 BMesh Iterators.

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 blender::damptrack_do_transform (float matrix[4][4], const float tarvec[3], int track_axis)
static bConstraint * blender::constraint_find_original (Object *ob, bPoseChannel *pchan, bConstraint *con, Object **r_orig_ob)
static bConstraint * blender::constraint_find_original_for_update (bConstraintOb *cob, bConstraint *con)
void blender::BKE_constraint_unique_name (struct bConstraint *con, ListBaseT< bConstraint > *list)
struct bConstraintOb * blender::BKE_constraints_make_evalob (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, void *subdata, short datatype)
void blender::BKE_constraints_clear_evalob (struct bConstraintOb *cob)
void blender::BKE_constraint_mat_convertspace (struct Object *ob, struct bPoseChannel *pchan, struct bConstraintOb *cob, float mat[4][4], short from, short to, bool keep_scale)
static void blender::contarget_get_mesh_mat (Object *ob, const char *substring, float mat[4][4])
static void blender::contarget_get_lattice_mat (Object *ob, const char *substring, float mat[4][4])
static void blender::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 blender::unit_ct_matrix_nullsafe (bConstraintTarget *ct)
static bool blender::default_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static bool blender::default_get_tarmat_full_bbone (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static bool blender::is_custom_space_needed (bConstraint *con)
static void blender::childof_new_data (void *cdata)
static void blender::childof_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::childof_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::childof_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::childof_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::trackto_new_data (void *cdata)
static void blender::trackto_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::trackto_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::trackto_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static int blender::basis_cross (int n, int m)
static void blender::vectomat (const float vec[3], const float target_up[3], short axis, short upflag, short flags, float m[3][3])
static void blender::trackto_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::kinematic_new_data (void *cdata)
static void blender::kinematic_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::kinematic_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::kinematic_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static bool blender::kinematic_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void blender::followpath_new_data (void *cdata)
static void blender::followpath_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::followpath_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::followpath_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static bool blender::followpath_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *, bConstraintTarget *ct, float)
static void blender::followpath_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::loclimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *)
static float blender::wrap_rad_angle (const float angle)
static float blender::clamp_angle (const float angle, const float min, const float max)
static void blender::rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *)
static void blender::sizelimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *)
static void blender::loclike_new_data (void *cdata)
static void blender::loclike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::loclike_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::loclike_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::loclike_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::rotlike_new_data (void *cdata)
static void blender::rotlike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::rotlike_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::rotlike_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::sizelike_new_data (void *cdata)
static void blender::sizelike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::sizelike_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::sizelike_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::sizelike_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::translike_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::translike_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::translike_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::translike_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::samevolume_new_data (void *cdata)
static void blender::samevolume_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *)
static void blender::armdef_free (bConstraint *con)
static void blender::armdef_copy (bConstraint *con, bConstraint *srccon)
static int blender::armdef_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::armdef_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static bool blender::armdef_get_tarmat (Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void blender::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 blender::armdef_accumulate_bone (const bConstraintTarget *ct, const bke::PChanBone pchanbone, const float wco[3], const bool force_envelope, float *r_totweight, float r_sum_mat[4][4], DualQuat *r_sum_dq)
static void blender::armdef_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::actcon_new_data (void *cdata)
static void blender::actcon_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::actcon_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::actcon_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static bool blender::actcon_get_tarmat (Depsgraph *depsgraph, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void blender::actcon_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::locktrack_new_data (void *cdata)
static void blender::locktrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::locktrack_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::locktrack_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::locktrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::distlimit_new_data (void *cdata)
static void blender::distlimit_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::distlimit_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::distlimit_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::distlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::stretchto_new_data (void *cdata)
static void blender::stretchto_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::stretchto_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::stretchto_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::stretchto_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::minmax_new_data (void *cdata)
static void blender::minmax_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::minmax_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::minmax_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::minmax_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::clampto_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::clampto_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::clampto_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static bool blender::clampto_get_tarmat (Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void blender::clampto_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::transform_new_data (void *cdata)
static void blender::transform_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::transform_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::transform_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::shrinkwrap_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static void blender::shrinkwrap_new_data (void *cdata)
static int blender::shrinkwrap_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::shrinkwrap_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static bool blender::shrinkwrap_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float)
static void blender::shrinkwrap_evaluate (bConstraint *, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::damptrack_new_data (void *cdata)
static void blender::damptrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::damptrack_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::damptrack_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::damptrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::splineik_free (bConstraint *con)
static void blender::splineik_copy (bConstraint *con, bConstraint *srccon)
static void blender::splineik_new_data (void *cdata)
static void blender::splineik_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::splineik_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::splineik_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static bool blender::splineik_get_tarmat (Depsgraph *, bConstraint *, bConstraintOb *, bConstraintTarget *ct, float)
static void blender::pivotcon_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static int blender::pivotcon_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::pivotcon_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy)
static void blender::pivotcon_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::followtrack_new_data (void *cdata)
static void blender::followtrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static MovieClip * blender::followtrack_tracking_clip_get (bConstraint *con, bConstraintOb *cob)
static MovieTrackingObject * blender::followtrack_tracking_object_get (bConstraint *con, bConstraintOb *cob)
static Object * blender::followtrack_camera_object_get (bConstraint *con, bConstraintOb *cob)
static bool blender::followtrack_context_init (FollowTrackContext *context, bConstraint *con, bConstraintOb *cob)
static void blender::followtrack_evaluate_using_3d_position_object (FollowTrackContext *context, bConstraintOb *cob)
static void blender::followtrack_evaluate_using_3d_position_camera (FollowTrackContext *context, bConstraintOb *cob)
static void blender::followtrack_evaluate_using_3d_position (FollowTrackContext *context, bConstraintOb *cob)
static void blender::followtrack_undistort_if_needed (FollowTrackContext *context, const int clip_width, const int clip_height, float marker_position[2])
static void blender::followtrack_fit_frame (FollowTrackContext *context, const int clip_width, const int clip_height, float marker_position[2])
static float blender::followtrack_distance_from_viewplane_get (FollowTrackContext *context, bConstraintOb *cob)
static void blender::followtrack_project_to_depth_object_if_needed (FollowTrackContext *context, bConstraintOb *cob)
static void blender::followtrack_evaluate_using_2d_position (FollowTrackContext *context, bConstraintOb *cob)
static void blender::followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *)
static void blender::camerasolver_new_data (void *cdata)
static void blender::camerasolver_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static void blender::camerasolver_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *)
static void blender::objectsolver_new_data (void *cdata)
static void blender::objectsolver_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static void blender::objectsolver_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *)
static void blender::transformcache_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static void blender::transformcache_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::transformcache_copy (bConstraint *con, bConstraint *srccon)
static void blender::transformcache_free (bConstraint *con)
static void blender::transformcache_new_data (void *cdata)
static bke::AttrDomain blender::domain_value_to_attribute (const Attribute_Domain domain)
static bke::AttrType blender::type_value_to_attribute (const Attribute_Data_Type data_type)
static void blender::value_attribute_to_matrix (float r_matrix[4][4], const GPointer value, const Attribute_Data_Type data_type)
static bool blender::component_is_available (const bke::GeometrySet &geometry, const bke::GeometryComponent::Type type, const bke::AttrDomain domain)
static const bke::GeometryComponent * blender::find_source_component (const bke::GeometrySet &geometry, const bke::AttrDomain domain)
static void blender::geometry_attribute_free_data (bConstraint *con)
static void blender::geometry_attribute_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata)
static void blender::geometry_attribute_copy_data (bConstraint *con, bConstraint *srccon)
static void blender::geometry_attribute_new_data (void *cdata)
static int blender::geometry_attribute_get_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list)
static void blender::geometry_attribute_flush_tars (bConstraint *con, ListBaseT< bConstraintTarget > *list, const bool no_copy)
static bool blender::geometry_attribute_get_tarmat (Depsgraph *, bConstraint *con, bConstraintOb *, bConstraintTarget *ct, float)
static void blender::geometry_attribute_evaluate (bConstraint *con, bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
static void blender::constraints_init_typeinfo ()
const bConstraintTypeInfo * blender::BKE_constraint_typeinfo_from_type (int type)
const bConstraintTypeInfo * blender::BKE_constraint_typeinfo_get (struct bConstraint *con)
static void blender::con_unlink_refs_cb (bConstraint *, ID **idpoin, bool is_reference, void *)
static void blender::con_invoke_id_looper (const bConstraintTypeInfo *cti, bConstraint *con, ConstraintIDFunc func, const int, void *userdata)
void blender::BKE_constraint_free_data_ex (struct bConstraint *con, bool do_id_user)
void blender::BKE_constraint_free_data (struct bConstraint *con)
void blender::BKE_constraints_free_ex (ListBaseT< bConstraint > *list, bool do_id_user)
void blender::BKE_constraints_free (ListBaseT< bConstraint > *list)
static bool blender::constraint_remove (ListBaseT< bConstraint > *list, bConstraint *con)
bool blender::BKE_constraint_remove_ex (ListBaseT< bConstraint > *list, struct Object *ob, struct bConstraint *con)
bool blender::BKE_constraint_apply_for_object (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct bConstraint *con)
bool blender::BKE_constraint_apply_and_remove_for_object (struct Depsgraph *depsgraph, struct Scene *scene, ListBaseT< bConstraint > *constraints, struct Object *ob, struct bConstraint *con)
bool blender::BKE_constraint_apply_for_pose (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, struct bConstraint *con)
bool blender::BKE_constraint_apply_and_remove_for_pose (struct Depsgraph *depsgraph, struct Scene *scene, ListBaseT< bConstraint > *constraints, struct Object *ob, struct bConstraint *con, struct bPoseChannel *pchan)
void blender::BKE_constraint_panel_expand (struct bConstraint *con)
static bConstraint * blender::add_new_constraint_internal (const char *name, eBConstraint_Types type)
static void blender::add_new_constraint_to_list (Object *ob, bPoseChannel *pchan, bConstraint *con)
static bConstraint * blender::add_new_constraint (Object *ob, bPoseChannel *pchan, const char *name, eBConstraint_Types type)
bool blender::BKE_constraint_target_uses_bbone (struct bConstraint *con, struct bConstraintTarget *ct)
struct bConstraint * blender::BKE_constraint_add_for_pose (struct Object *ob, struct bPoseChannel *pchan, const char *name, eBConstraint_Types type)
struct bConstraint * blender::BKE_constraint_add_for_object (struct Object *ob, const char *name, eBConstraint_Types type)
void blender::BKE_constraints_id_loop (ListBaseT< bConstraint > *list, ConstraintIDFunc func, const int flag, void *userdata)
static void blender::con_extern_cb (bConstraint *, ID **idpoin, bool, void *)
static void blender::con_fix_copied_refs_cb (bConstraint *, ID **idpoin, bool is_reference, void *)
static void blender::constraint_copy_data_ex (bConstraint *dst, bConstraint *src, const int flag, const bool do_extern)
struct bConstraint * blender::BKE_constraint_duplicate_ex (struct bConstraint *src, int flag, bool do_extern)
struct bConstraint * blender::BKE_constraint_copy_for_pose (struct Object *ob, struct bPoseChannel *pchan, struct bConstraint *src)
struct bConstraint * blender::BKE_constraint_copy_for_object (struct Object *ob, struct bConstraint *src)
void blender::BKE_constraints_copy_ex (ListBaseT< bConstraint > *dst, const ListBaseT< bConstraint > *src, int flag, bool do_extern)
void blender::BKE_constraints_copy (ListBaseT< bConstraint > *dst, const ListBaseT< bConstraint > *src, bool do_extern)
struct bConstraint * blender::BKE_constraints_find_name (ListBaseT< bConstraint > *list, const char *name)
struct bConstraint * blender::BKE_constraints_active_get (ListBaseT< bConstraint > *list)
void blender::BKE_constraints_active_set (ListBaseT< bConstraint > *list, struct bConstraint *con)
bool blender::BKE_constraint_has_influence (const bConstraint *con)
static bConstraint * blender::constraint_list_find_from_target (ListBaseT< bConstraint > *constraints, bConstraintTarget *tgt)
struct bConstraint * blender::BKE_constraint_find_from_target (struct Object *ob, struct bConstraintTarget *tgt, struct bPoseChannel **r_pchan)
bool blender::BKE_constraint_is_nonlocal_in_liboverride (const Object *ob, const bConstraint *con)
int blender::BKE_constraint_targets_get (struct bConstraint *con, ListBaseT< bConstraintTarget > *r_targets)
void blender::BKE_constraint_targets_flush (struct bConstraint *con, ListBaseT< bConstraintTarget > *targets, bool no_copy)
void blender::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)
void blender::BKE_constraint_targets_for_solving_get (struct Depsgraph *depsgraph, struct bConstraint *con, struct bConstraintOb *ob, ListBaseT< bConstraintTarget > *targets, float ctime)
void blender::BKE_constraint_custom_object_space_init (struct bConstraintOb *cob, struct bConstraint *con)
void blender::BKE_constraints_solve (struct Depsgraph *depsgraph, ListBaseT< bConstraint > *conlist, struct bConstraintOb *cob, float ctime)
void blender::BKE_constraint_blend_write (struct BlendWriter *writer, ListBaseT< bConstraint > *conlist)
void blender::BKE_constraint_blend_read_data (struct BlendDataReader *reader, struct ID *id_owner, ListBaseT< bConstraint > *lb)

Variables

static CLG_LogRef blender::LOG = {"object.constraint"}
static bConstraintTypeInfo blender::CTI_CHILDOF
static bConstraintTypeInfo blender::CTI_TRACKTO
static bConstraintTypeInfo blender::CTI_KINEMATIC
static bConstraintTypeInfo blender::CTI_FOLLOWPATH
static bConstraintTypeInfo blender::CTI_LOCLIMIT
static bConstraintTypeInfo blender::CTI_ROTLIMIT
static bConstraintTypeInfo blender::CTI_SIZELIMIT
static bConstraintTypeInfo blender::CTI_LOCLIKE
static bConstraintTypeInfo blender::CTI_ROTLIKE
static bConstraintTypeInfo blender::CTI_SIZELIKE
static bConstraintTypeInfo blender::CTI_TRANSLIKE
static bConstraintTypeInfo blender::CTI_SAMEVOL
static bConstraintTypeInfo blender::CTI_ARMATURE
static bConstraintTypeInfo blender::CTI_ACTION
static bConstraintTypeInfo blender::CTI_LOCKTRACK
static bConstraintTypeInfo blender::CTI_DISTLIMIT
static bConstraintTypeInfo blender::CTI_STRETCHTO
static bConstraintTypeInfo blender::CTI_MINMAX
static bConstraintTypeInfo blender::CTI_CLAMPTO
static bConstraintTypeInfo blender::CTI_TRANSFORM
static bConstraintTypeInfo blender::CTI_SHRINKWRAP
static const float blender::track_dir_vecs [6][3]
static bConstraintTypeInfo blender::CTI_DAMPTRACK
static bConstraintTypeInfo blender::CTI_SPLINEIK
static bConstraintTypeInfo blender::CTI_PIVOT
static bConstraintTypeInfo blender::CTI_FOLLOWTRACK
static bConstraintTypeInfo blender::CTI_CAMERASOLVER
static bConstraintTypeInfo blender::CTI_OBJECTSOLVER
static bConstraintTypeInfo blender::CTI_TRANSFORM_CACHE
static bConstraintTypeInfo blender::CTI_ATTRIBUTE
static bConstraintTypeInfo * blender::constraintsTypeInfo [NUM_CONSTRAINT_TYPES]
static short blender::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_UTF8(datasubtarget, ct->subtarget); \
con->tarspace = ct->space; \
} \
\
BLI_freelinkN(list, ct); \
ct = ctn; \
} \
} \
(void)0

Definition at line 949 of file constraint.cc.

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

◆ SINGLETARGET_GET_TARS

#define SINGLETARGET_GET_TARS ( con,
datatar,
datasubtarget,
ct,
list )
Value:
{ \
ct = MEM_new<bConstraintTarget>("tempConstraintTarget"); \
\
ct->tar = datatar; \
STRNCPY_UTF8(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
#define OB_TYPE_SUPPORT_VGROUP(_type)

Definition at line 893 of file constraint.cc.

Referenced by blender::actcon_get_tars(), blender::BKE_constraint_targets_get(), blender::childof_get_tars(), blender::damptrack_get_tars(), blender::distlimit_get_tars(), blender::kinematic_get_tars(), blender::locktrack_get_tars(), blender::loclike_get_tars(), blender::minmax_get_tars(), blender::pivotcon_get_tars(), blender::rotlike_get_tars(), blender::sizelike_get_tars(), blender::stretchto_get_tars(), blender::trackto_get_tars(), blender::transform_get_tars(), and blender::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 = ct->space; \
} \
\
BLI_freelinkN(list, ct); \
ct = ctn; \
} \
} \
(void)0

Definition at line 971 of file constraint.cc.

Referenced by blender::clampto_flush_tars(), blender::followpath_flush_tars(), blender::geometry_attribute_flush_tars(), blender::shrinkwrap_flush_tars(), and blender::splineik_flush_tars().

◆ SINGLETARGETNS_GET_TARS

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

Definition at line 928 of file constraint.cc.

Referenced by blender::clampto_get_tars(), blender::followpath_get_tars(), blender::geometry_attribute_get_tars(), blender::shrinkwrap_get_tars(), and blender::splineik_get_tars().

◆ VALID_CONS_TARGET