Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_extra.c
| Show First 20 Lines • Show All 1,305 Lines • ▼ Show 20 Lines | for (curcon = list->first; curcon; curcon = curcon->next) { | ||||
| } | } | ||||
| if (camob) { | if (camob) { | ||||
| OVERLAY_extra_line_dashed(cb, camob->obmat[3], ob->obmat[3], constraint_color); | OVERLAY_extra_line_dashed(cb, camob->obmat[3], ob->obmat[3], constraint_color); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(curcon); | const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(curcon); | ||||
| if ((cti && cti->get_constraint_targets) && (curcon->ui_expand_flag & (1 << 0))) { | |||||
| ListBase targets = {NULL, NULL}; | ListBase targets = {NULL, NULL}; | ||||
| if ((curcon->ui_expand_flag & (1 << 0)) && BKE_constraint_targets_get(curcon, &targets)) { | |||||
| bConstraintTarget *ct; | bConstraintTarget *ct; | ||||
| cti->get_constraint_targets(curcon, &targets); | |||||
| for (ct = targets.first; ct; ct = ct->next) { | for (ct = targets.first; ct; ct = ct->next) { | ||||
| /* calculate target's matrix */ | /* calculate target's matrix */ | ||||
| if (cti->get_target_matrix) { | if (cti->get_target_matrix) { | ||||
| cti->get_target_matrix(depsgraph, curcon, cob, ct, DEG_get_ctime(depsgraph)); | cti->get_target_matrix(depsgraph, curcon, cob, ct, DEG_get_ctime(depsgraph)); | ||||
| } | } | ||||
| else { | else { | ||||
| unit_m4(ct->matrix); | unit_m4(ct->matrix); | ||||
| } | } | ||||
| OVERLAY_extra_line_dashed(cb, ct->matrix[3], ob->obmat[3], constraint_color); | OVERLAY_extra_line_dashed(cb, ct->matrix[3], ob->obmat[3], constraint_color); | ||||
| } | } | ||||
| if (cti->flush_constraint_targets) { | BKE_constraint_targets_flush(curcon, &targets, 1); | ||||
| cti->flush_constraint_targets(curcon, &targets, 1); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* NOTE: Don't use BKE_constraints_clear_evalob here as that will reset ob->constinv. */ | /* NOTE: Don't use BKE_constraints_clear_evalob here as that will reset ob->constinv. */ | ||||
| MEM_freeN(cob); | MEM_freeN(cob); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 296 Lines • Show Last 20 Lines | |||||