[Bf-blender-cvs] [615af4e2396] master: DRW: draw hook relationship lines
Campbell Barton
noreply at git.blender.org
Mon Jul 20 01:25:45 CEST 2020
Commit: 615af4e23969529371fbc594d8cf61dc13612790
Author: Campbell Barton
Date: Mon Jul 20 09:20:11 2020 +1000
Branches: master
https://developer.blender.org/rB615af4e23969529371fbc594d8cf61dc13612790
DRW: draw hook relationship lines
This wasn't added back from 2.7x, making "Recenter Hook" applier to
do nothing.
===================================================================
M source/blender/draw/engines/overlay/overlay_extra.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list