diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-20 02:20:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-20 02:25:26 +0300 |
commit | 615af4e23969529371fbc594d8cf61dc13612790 (patch) | |
tree | fbc4d30ba74b6c62fb9c4b638c80824a47535d97 /source/blender/draw/engines | |
parent | 9db4e44961d3ae46b1a9a2dd2ff4c0743e8263f5 (diff) |
DRW: draw hook relationship lines
This wasn't added back from 2.7x, making "Recenter Hook" applier to
do nothing.
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_extra.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c index fc1ced43832..d4169014385 100644 --- a/source/blender/draw/engines/overlay/overlay_extra.c +++ b/source/blender/draw/engines/overlay/overlay_extra.c @@ -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; |