Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-12-02 17:34:12 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-12-02 17:34:12 +0300
commit7866512627f5e2f9afde474b416996d502cf12e0 (patch)
tree5c95e5b24fb765ffa99c40f4f9769d1db7d6e47b /source/blender
parent014eb69cf858036816d12a4b92ffe6681978b683 (diff)
Overlay: Armature: Fix Crash when selecting in edit armature mode
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/draw/engines/overlay/overlay_armature.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_armature.c b/source/blender/draw/engines/overlay/overlay_armature.c
index c749d902f86..8930ccb94b3 100644
--- a/source/blender/draw/engines/overlay/overlay_armature.c
+++ b/source/blender/draw/engines/overlay/overlay_armature.c
@@ -2167,6 +2167,8 @@ static void armature_context_setup(ArmatureDrawContext *ctx,
bArmature *arm = ob->data;
OVERLAY_ArmatureCallBuffers *cb = &pd->armature_call_buffers[is_xray];
+ static const float select_const_color[4] = {1.0f, 1.0f, 1.0f, 1.0f};
+
switch (arm->drawtype) {
case ARM_ENVELOPE:
ctx->envelope_outline = cb->envelope_outline;
@@ -2200,7 +2202,7 @@ static void armature_context_setup(ArmatureDrawContext *ctx,
ctx->custom_shapes_ghash = cb->custom_shapes_ghash;
ctx->transparent = pd->armature.transparent;
ctx->show_relations = pd->armature.show_relations;
- ctx->const_color = const_color;
+ ctx->const_color = DRW_state_is_select() ? select_const_color : const_color;
ctx->const_wire = (((ob->base_flag & BASE_SELECTED) || (arm->drawtype == ARM_WIRE)) ?
1.5f :
((ctx->transparent) ? 1.0f : 0.0f));