|
Blender V4.3
|
#include <BKE_constraint.h>
Public Attributes | |
| short | type |
| short | size |
| char | name [32] |
| char | struct_name [32] |
| void(* | free_data )(struct bConstraint *con) |
| void(* | id_looper )(struct bConstraint *con, ConstraintIDFunc func, void *userdata) |
| void(* | copy_data )(struct bConstraint *con, struct bConstraint *src) |
| void(* | new_data )(void *cdata) |
| int(* | get_constraint_targets )(struct bConstraint *con, struct ListBase *list) |
| void(* | flush_constraint_targets )(struct bConstraint *con, struct ListBase *list, bool no_copy) |
| void(* | get_target_matrix )(struct Depsgraph *depsgraph, struct bConstraint *con, struct bConstraintOb *cob, struct bConstraintTarget *ct, float ctime) |
| void(* | evaluate_constraint )(struct bConstraint *con, struct bConstraintOb *cob, struct ListBase *targets) |
Constraint Type-Info (shorthand in code = cti): This struct provides function pointers for runtime, so that functions can be written more generally (with fewer/no special exceptions for various constraints).
Callers of these functions must check that they actually point to something useful, as some constraints don't define some of these.
WARNING: it is not too advisable to reorder order of members of this struct, as you'll have to edit quite a few NUM_CONSTRAINT_TYPES of these structs.
Definition at line 75 of file BKE_constraint.h.
| void(* bConstraintTypeInfo::copy_data) (struct bConstraint *con, struct bConstraint *src) |
copy any special data that is allocated separately (optional)
Definition at line 92 of file BKE_constraint.h.
Referenced by constraint_copy_data_ex().
| void(* bConstraintTypeInfo::evaluate_constraint) (struct bConstraint *con, struct bConstraintOb *cob, struct ListBase *targets) |
Evaluate the constraint for the given time. solved as separate loop.
Definition at line 122 of file BKE_constraint.h.
Referenced by bc_validateConstraints(), BKE_constraints_solve(), constraintRotLim(), constraintSizeLim(), and constraintTransLim().
| void(* bConstraintTypeInfo::flush_constraint_targets) (struct bConstraint *con, struct ListBase *list, bool no_copy) |
For single-target constraints only: flush data back to source data, and the free memory used.
Definition at line 109 of file BKE_constraint.h.
Referenced by BKE_constraint_target_matrix_get(), BKE_constraint_targets_flush(), and BKE_constraints_solve().
| void(* bConstraintTypeInfo::free_data) (struct bConstraint *con) |
free any data that is allocated separately (optional)
Definition at line 88 of file BKE_constraint.h.
Referenced by BKE_constraint_free_data_ex().
| int(* bConstraintTypeInfo::get_constraint_targets) (struct bConstraint *con, struct ListBase *list) |
For multi-target constraints: return that list; otherwise make a temporary list (returns number of targets).
Definition at line 104 of file BKE_constraint.h.
Referenced by BKE_constraint_target_matrix_get(), BKE_constraint_targets_for_solving_get(), and BKE_constraint_targets_get().
| void(* bConstraintTypeInfo::get_target_matrix) (struct Depsgraph *depsgraph, struct bConstraint *con, struct bConstraintOb *cob, struct bConstraintTarget *ct, float ctime) |
set the ct->matrix for the given constraint target (at the given ctime)
Definition at line 113 of file BKE_constraint.h.
Referenced by BKE_constraint_target_matrix_get(), BKE_constraint_targets_for_solving_get(), blender::draw::overlay::Relations::object_sync(), and OVERLAY_relationship_lines().
| void(* bConstraintTypeInfo::id_looper) (struct bConstraint *con, ConstraintIDFunc func, void *userdata) |
run the provided callback function on all the ID-blocks linked to the constraint
Definition at line 90 of file BKE_constraint.h.
Referenced by con_invoke_id_looper().
| char bConstraintTypeInfo::name[32] |
name of constraint in interface
Definition at line 82 of file BKE_constraint.h.
Referenced by add_new_constraint_internal(), and blender::deg::DepsgraphRelationBuilder::build_constraints().
| void(* bConstraintTypeInfo::new_data) (void *cdata) |
Set settings for data that will be used for bConstraint.data (memory already allocated using MEM_callocN).
Definition at line 97 of file BKE_constraint.h.
Referenced by add_new_constraint_internal().
| short bConstraintTypeInfo::size |
size in bytes of the struct
Definition at line 80 of file BKE_constraint.h.
Referenced by add_new_constraint_internal().
| char bConstraintTypeInfo::struct_name[32] |
name of struct for SDNA
Definition at line 84 of file BKE_constraint.h.
Referenced by add_new_constraint_internal(), BKE_constraint_blend_read_data(), BKE_constraint_blend_write(), bone_constraint_panel_id(), and object_constraint_panel_id().
| short bConstraintTypeInfo::type |
CONSTRAINT_TYPE_###
Definition at line 78 of file BKE_constraint.h.
Referenced by BKE_constraint_targets_for_solving_get(), blender::deg::DepsgraphRelationBuilder::build_constraints(), object_solver_camera(), and object_solver_inverted_matrix().