Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_constraint.h
| Show First 20 Lines • Show All 301 Lines • ▼ Show 20 Lines | |||||
| void BKE_constraint_target_matrix_get(struct Depsgraph *depsgraph, | void BKE_constraint_target_matrix_get(struct Depsgraph *depsgraph, | ||||
| struct Scene *scene, | struct Scene *scene, | ||||
| struct bConstraint *con, | struct bConstraint *con, | ||||
| int index, | int index, | ||||
| short ownertype, | short ownertype, | ||||
| void *ownerdata, | void *ownerdata, | ||||
| float mat[4][4], | float mat[4][4], | ||||
| float ctime); | float ctime); | ||||
| /** | |||||
| * Retrieves the list of all constraint targets, including the custom space target. | |||||
| * Must be followed by a call to BKE_constraint_targets_flush to free memory. | |||||
| * | |||||
| * \param r_targets Pointer to the list to be initialized with target data. | |||||
sybren: Document the return value. | |||||
Done Inline ActionsDocument that r_list is appended to by this function, and not cleared. sybren: Document that `r_list` is appended to by this function, and not cleared. | |||||
Done Inline ActionsActually, there is no reason not to clear it - it's just an artifact of how things worked before. angavrilov: Actually, there is no reason not to clear it - it's just an artifact of how things worked… | |||||
| * \returns the number of targets stored in the list. | |||||
| */ | |||||
| int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets); | |||||
| /** | |||||
Done Inline ActionsDocument what type should be in list. sybren: Document what type should be in `list`. | |||||
Done Inline ActionsName list after the thing in there. The fact that it's a ListBase already communicates that this is a list. sybren: Name `list` after the thing in there. The fact that it's a `ListBase` already communicates that… | |||||
Not Done Inline ActionsI'm not a fan of boolean parameters, and even less of inverted boolean parameters. This should at least document what happens when it's true/false. It would be even better to just have two separate functions, one for copying and one for not, if that's in any way doable. They can then get their own documentation. sybren: I'm not a fan of boolean parameters, and even less of inverted boolean parameters. This should… | |||||
Done Inline ActionsThe parameter is directly inherited from the original callback, so parameters in the calls to the wrapper look the same. angavrilov: The parameter is directly inherited from the original callback, so parameters in the calls to… | |||||
| * Copies changed data from the list produced by BKE_constraint_targets_get back to the constraint | |||||
| * data structures and frees memory. | |||||
| * | |||||
| * \param targets List of targets filled by BKE_constraint_targets_get. | |||||
| * \param no_copy Only free memory without copying changes (read-only mode). | |||||
| */ | |||||
| void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targets, bool no_copy); | |||||
| /** | /** | ||||
| * Get the list of targets required for solving a constraint. | * Get the list of targets required for solving a constraint. | ||||
| */ | */ | ||||
| void BKE_constraint_targets_for_solving_get(struct Depsgraph *depsgraph, | void BKE_constraint_targets_for_solving_get(struct Depsgraph *depsgraph, | ||||
| struct bConstraint *con, | struct bConstraint *con, | ||||
| struct bConstraintOb *ob, | struct bConstraintOb *ob, | ||||
| struct ListBase *targets, | struct ListBase *targets, | ||||
| float ctime); | float ctime); | ||||
| Show All 23 Lines | |||||
Document the return value.