[Bf-blender-cvs] [7866512627f] master: Overlay: Armature: Fix Crash when selecting in edit armature mode

Clément Foucault noreply at git.blender.org
Mon Dec 2 15:34:30 CET 2019


Commit: 7866512627f5e2f9afde474b416996d502cf12e0
Author: Clément Foucault
Date:   Mon Dec 2 15:34:12 2019 +0100
Branches: master
https://developer.blender.org/rB7866512627f5e2f9afde474b416996d502cf12e0

Overlay: Armature: Fix Crash when selecting in edit armature mode

===================================================================

M	source/blender/draw/engines/overlay/overlay_armature.c

===================================================================

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));



More information about the Bf-blender-cvs mailing list