|
Blender V5.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, ListBaseT< bConstraintTarget > *list) |
| void(*) | flush_constraint_targets (struct bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy) |
| bool(*) | 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, ListBaseT< bConstraintTarget > *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 81 of file BKE_constraint.h.
| void(*) blender::bConstraintTypeInfo::copy_data(struct bConstraint *con, struct bConstraint *src) |
copy any special data that is allocated separately (optional)
Definition at line 98 of file BKE_constraint.h.
Referenced by blender::constraint_copy_data_ex().
| void(*) blender::bConstraintTypeInfo::evaluate_constraint(struct bConstraint *con, struct bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets) |
Evaluate the constraint for the given time. solved as separate loop.
Definition at line 138 of file BKE_constraint.h.
Referenced by blender::BKE_constraints_solve(), blender::ed::transform::constraintRotLim(), blender::ed::transform::constraintScaleLim(), and blender::ed::transform::constraintTransLim().
| void(*) blender::bConstraintTypeInfo::flush_constraint_targets(struct bConstraint *con, ListBaseT< bConstraintTarget > *list, bool no_copy) |
For single-target constraints only: flush data back to source data, and the free memory used.
Definition at line 115 of file BKE_constraint.h.
Referenced by blender::BKE_constraint_target_matrix_get(), blender::BKE_constraint_targets_flush(), and blender::BKE_constraints_solve().
| void(*) blender::bConstraintTypeInfo::free_data(struct bConstraint *con) |
free any data that is allocated separately (optional)
Definition at line 94 of file BKE_constraint.h.
Referenced by blender::BKE_constraint_free_data_ex().
| int(*) blender::bConstraintTypeInfo::get_constraint_targets(struct bConstraint *con, ListBaseT< bConstraintTarget > *list) |
For multi-target constraints: return that list; otherwise make a temporary list (returns number of targets).
Definition at line 110 of file BKE_constraint.h.
Referenced by blender::BKE_constraint_target_matrix_get(), blender::BKE_constraint_targets_for_solving_get(), and blender::BKE_constraint_targets_get().
| bool(*) blender::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).
Note that ct->matrix may still be updated (typically to the identity matrix) even when this function returns false.
Definition at line 129 of file BKE_constraint.h.
Referenced by blender::BKE_constraint_target_matrix_get(), blender::BKE_constraint_targets_for_solving_get(), and blender::draw::overlay::Relations::object_sync().
| void(*) blender::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 96 of file BKE_constraint.h.
Referenced by blender::con_invoke_id_looper().
| char blender::bConstraintTypeInfo::name[32] |
name of constraint in interface
Definition at line 88 of file BKE_constraint.h.
Referenced by blender::add_new_constraint_internal(), and blender::deg::DepsgraphRelationBuilder::build_constraints().
| void(*) blender::bConstraintTypeInfo::new_data(void *cdata) |
Set settings for data that will be used for #bConstraint.data (memory already allocated using MEM_new_zeroed).
Definition at line 103 of file BKE_constraint.h.
Referenced by blender::add_new_constraint_internal().
| short blender::bConstraintTypeInfo::size |
size in bytes of the struct
Definition at line 86 of file BKE_constraint.h.
Referenced by blender::add_new_constraint_internal().
| char blender::bConstraintTypeInfo::struct_name[32] |
name of struct for SDNA
Definition at line 90 of file BKE_constraint.h.
Referenced by blender::add_new_constraint_internal(), blender::BKE_constraint_blend_read_data(), blender::BKE_constraint_blend_write(), blender::ui::bone_constraint_panel_id(), and blender::ui::object_constraint_panel_id().
| short blender::bConstraintTypeInfo::type |
CONSTRAINT_TYPE_###
Definition at line 84 of file BKE_constraint.h.
Referenced by blender::BKE_constraint_targets_for_solving_get(), blender::deg::DepsgraphRelationBuilder::build_constraints(), blender::object_solver_camera(), and blender::object_solver_inverted_matrix().