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:
authorCampbell Barton <campbell@blender.org>2022-02-02 10:06:51 +0300
committerCampbell Barton <campbell@blender.org>2022-02-02 10:06:51 +0300
commitda5e72eb01027d6992244983fc86b1d919c9c8bb (patch)
tree4f8f88e3bccebaca7e5af2d352374e44d7e044ed
parentcabc9506f9ace9f89f4a6d92dff676284e3a989f (diff)
Cleanup: exclude bone names & axes from selection drawing
These aren't used for picking bones so there is no need to draw them.
-rw-r--r--source/blender/draw/engines/overlay/overlay_armature.c39
1 files changed, 24 insertions, 15 deletions
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);
+ }
}
}
}