[Bf-blender-cvs] [da5e72eb010] master: Cleanup: exclude bone names & axes from selection drawing

Campbell Barton noreply at git.blender.org
Wed Feb 2 08:14:07 CET 2022


Commit: da5e72eb01027d6992244983fc86b1d919c9c8bb
Author: Campbell Barton
Date:   Wed Feb 2 18:06:51 2022 +1100
Branches: master
https://developer.blender.org/rBda5e72eb01027d6992244983fc86b1d919c9c8bb

Cleanup: exclude bone names & axes from selection drawing

These aren't used for picking bones so there is no need to draw them.

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

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 4029f1237e8..2b80ccc57d5 100644
--- a/source/blender/draw/engines/overlay/overlay_armature.c
+++ b/source/blender/draw/engines/overlay/overlay_armature.c
@@ -2084,7 +2084,9 @@ static void draw_armature_edit(ArmatureDrawContext *ctx)
 
         boneflag &= ~BONE_DRAW_LOCKED_WEIGHT;
 
-        draw_bone_relations(ctx, eBone, NULL, arm, boneflag, constflag);
+        if (!is_select) {
+          draw_bone_relations(ctx, eBone, NULL, arm, boneflag, constflag);
+        }
 
         if (arm->drawtype == ARM_ENVELOPE) {
           draw_bone_update_disp_matrix_default(eBone, NULL);
@@ -2107,12 +2109,14 @@ static void draw_armature_edit(ArmatureDrawContext *ctx)
           draw_bone_octahedral(ctx, eBone, NULL, arm, boneflag, constflag, select_id);
         }
 
-        if (show_text && (arm->flag & ARM_DRAWNAMES)) {
-          draw_bone_name(ctx, eBone, NULL, arm, boneflag);
-        }
+        if (!is_select) {
+          if (show_text && (arm->flag & ARM_DRAWNAMES)) {
+            draw_bone_name(ctx, eBone, NULL, arm, boneflag);
+          }
 
-        if (arm->flag & ARM_DRAWAXES) {
-          draw_axes(ctx, eBone, NULL, arm);
+          if (arm->flag & ARM_DRAWAXES) {
+            draw_axes(ctx, eBone, NULL, arm);
+          }
         }
       }
     }
@@ -2221,7 +2225,9 @@ static void draw_armature_pose(ArmatureDrawContext *ctx)
           boneflag &= ~BONE_DRAW_LOCKED_WEIGHT;
         }
 
-        draw_bone_relations(ctx, NULL, pchan, arm, boneflag, constflag);
+        if (!is_pose_select) {
+          draw_bone_relations(ctx, NULL, pchan, arm, boneflag, constflag);
+        }
 
         if ((pchan->custom) && !(arm->flag & ARM_NO_CUSTOM)) {
           draw_bone_update_disp_matrix_custom(pchan);
@@ -2248,16 +2254,19 @@ static void draw_armature_pose(ArmatureDrawContext *ctx)
           draw_bone_octahedral(ctx, NULL, pchan, arm, boneflag, constflag, select_id);
         }
 
-        if (draw_dofs) {
-          draw_bone_degrees_of_freedom(ctx, pchan);
-        }
+        /* These aren't included in the selection. */
+        if (!is_pose_select) {
+          if (draw_dofs) {
+            draw_bone_degrees_of_freedom(ctx, pchan);
+          }
 
-        if (show_text && (arm->flag & ARM_DRAWNAMES)) {
-          draw_bone_name(ctx, NULL, pchan, arm, boneflag);
-        }
+          if (show_text && (arm->flag & ARM_DRAWNAMES)) {
+            draw_bone_name(ctx, NULL, pchan, arm, boneflag);
+          }
 
-        if (arm->flag & ARM_DRAWAXES) {
-          draw_axes(ctx, NULL, pchan, arm);
+          if (arm->flag & ARM_DRAWAXES) {
+            draw_axes(ctx, NULL, pchan, arm);
+          }
         }
       }
     }



More information about the Bf-blender-cvs mailing list