Fix: missing greasepencil hook modifier relationship lines
Overlay relationship lines were missing between the object having the modifier and the target object. To make this consistent with other objects types, now draw relationship lines for greasepencil and hooks now, too. Spotted while looking into T102741. Maniphest Tasks: T102741 Differential Revision: https://developer.blender.org/D16609
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "DNA_constraint_types.h"
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_fluid_types.h"
|
||||
#include "DNA_gpencil_modifier_types.h"
|
||||
#include "DNA_lightprobe_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meta_types.h"
|
||||
@@ -1273,6 +1274,20 @@ static void OVERLAY_relationship_lines(OVERLAY_ExtraCallBuffers *cb,
|
||||
OVERLAY_extra_point(cb, center, relation_color);
|
||||
}
|
||||
}
|
||||
for (GpencilModifierData *md =
|
||||
static_cast<GpencilModifierData *>(ob->greasepencil_modifiers.first);
|
||||
md;
|
||||
md = md->next) {
|
||||
if (md->type == eGpencilModifierType_Hook) {
|
||||
HookGpencilModifierData *hmd = (HookGpencilModifierData *)md;
|
||||
float center[3];
|
||||
mul_v3_m4v3(center, ob->object_to_world, hmd->cent);
|
||||
if (hmd->object) {
|
||||
OVERLAY_extra_line_dashed(cb, hmd->object->object_to_world[3], center, relation_color);
|
||||
}
|
||||
OVERLAY_extra_point(cb, center, relation_color);
|
||||
}
|
||||
}
|
||||
|
||||
if (ob->rigidbody_constraint) {
|
||||
Object *rbc_ob1 = ob->rigidbody_constraint->ob1;
|
||||
|
||||
Reference in New Issue
Block a user