Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_constraint.h
| Show First 20 Lines • Show All 317 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. | |||||
| */ | |||||
| int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_list); | |||||
sybren: Document the return value. | |||||
sybrenUnsubmitted 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. | |||||
angavrilovAuthorUnsubmitted 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… | |||||
| /** | |||||
| * Copies data from the list produced by BKE_constraint_targets_get back and frees memory. | |||||
| */ | |||||
| void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *list, bool no_copy); | |||||
sybrenUnsubmitted Done Inline ActionsDocument what type should be in list. sybren: Document what type should be in `list`. | |||||
sybrenUnsubmitted 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… | |||||
sybrenUnsubmitted 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… | |||||
angavrilovAuthorUnsubmitted 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… | |||||
| /** | /** | ||||
| * 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.