DRW: draw hook relationship lines
This wasn't added back from 2.7x, making "Recenter Hook" applier to do nothing.
This commit is contained in:
parent
9db4e44961
commit
615af4e239
Notes:
blender-bot
2023-02-14 03:00:45 +01:00
Referenced by issue #79088, Recenter Hook doesn't work
|
@ -1284,6 +1284,19 @@ static void OVERLAY_relationship_lines(OVERLAY_ExtraCallBuffers *cb,
|
|||
OVERLAY_extra_line_dashed(cb, parent_pos, ob->obmat[3], relation_color);
|
||||
}
|
||||
|
||||
/* Drawing the hook lines. */
|
||||
for (ModifierData *md = ob->modifiers.first; md; md = md->next) {
|
||||
if (md->type == eModifierType_Hook) {
|
||||
HookModifierData *hmd = (HookModifierData *)md;
|
||||
float center[3];
|
||||
mul_v3_m4v3(center, ob->obmat, hmd->cent);
|
||||
if (hmd->object) {
|
||||
OVERLAY_extra_line_dashed(cb, hmd->object->obmat[3], center, relation_color);
|
||||
}
|
||||
OVERLAY_extra_point(cb, center, relation_color);
|
||||
}
|
||||
}
|
||||
|
||||
if (ob->rigidbody_constraint) {
|
||||
Object *rbc_ob1 = ob->rigidbody_constraint->ob1;
|
||||
Object *rbc_ob2 = ob->rigidbody_constraint->ob2;
|
||||
|
|
Loading…
Reference in New Issue