Commit: 28ccc0fa2f148bac7d3ed3ebdbe2b2dfa5ee5efc
Author: Clément Foucault
Date:   Wed Feb 27 17:35:43 2019 +0100
Branches: master
https://developer.blender.org/rB28ccc0fa2f148bac7d3ed3ebdbe2b2dfa5ee5efc

Armature: Remove the Transparent Bone overlay option

The option is replaced by the Wireframe mode display which (in edit & pose
mode) does exactly what transparent bones did.

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

M       release/scripts/startup/bl_ui/space_view3d.py
M       source/blender/draw/modes/edit_armature_mode.c
M       source/blender/draw/modes/pose_mode.c
M       source/blender/makesdna/DNA_view3d_types.h
M       source/blender/makesrna/intern/rna_space.c

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index d44f0943c30..3a8419ffe3e 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -5192,7 +5192,6 @@ class VIEW3D_PT_overlay_pose(Panel):
 
         col = layout.column()
         col.active = display_all
-        col.prop(overlay, "show_transparent_bones")
 
         if mode == 'POSE':
             row = col.row()
@@ -5205,27 +5204,6 @@ class VIEW3D_PT_overlay_pose(Panel):
             row.prop(overlay, "show_xray_bone")
 
 
-class VIEW3D_PT_overlay_edit_armature(Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'HEADER'
-    bl_parent_id = 'VIEW3D_PT_overlay'
-    bl_label = "Armature Edit Mode"
-
-    @classmethod
-    def poll(cls, context):
-        return context.mode == 'EDIT_ARMATURE'
-
-    def draw(self, context):
-        layout = self.layout
-        view = context.space_data
-        overlay = view.overlay
-        display_all = overlay.show_overlays
-
-        col = layout.column()
-        col.active = display_all
-        col.prop(overlay, "show_transparent_bones")
-
-
 class VIEW3D_PT_overlay_paint(Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'HEADER'
@@ -5916,7 +5894,6 @@ classes = (
     VIEW3D_PT_overlay_edit_mesh_freestyle,
     VIEW3D_PT_overlay_edit_mesh_developer,
     VIEW3D_PT_overlay_edit_curve,
-    VIEW3D_PT_overlay_edit_armature,
     VIEW3D_PT_overlay_paint,
     VIEW3D_PT_overlay_pose,
     VIEW3D_PT_overlay_sculpt,
diff --git a/source/blender/draw/modes/edit_armature_mode.c 
b/source/blender/draw/modes/edit_armature_mode.c
index 22211730ff6..4eaa9447efe 100644
--- a/source/blender/draw/modes/edit_armature_mode.c
+++ b/source/blender/draw/modes/edit_armature_mode.c
@@ -70,8 +70,7 @@ static void EDIT_ARMATURE_cache_init(void *vedata)
                /* Alloc transient pointers */
                stl->g_data = MEM_callocN(sizeof(*stl->g_data), __func__);
        }
-       stl->g_data->transparent_bones = (draw_ctx->v3d->shading.type == 
OB_WIRE) ||
-                                        (draw_ctx->v3d->overlay.arm_flag & 
V3D_OVERLAY_ARM_TRANSP_BONES) != 0;
+       stl->g_data->transparent_bones = (draw_ctx->v3d->shading.type == 
OB_WIRE);
 
        for (int i = 0; i < 2; ++i) {
                /* Solid bones */
diff --git a/source/blender/draw/modes/pose_mode.c 
b/source/blender/draw/modes/pose_mode.c
index 6b646bfa0ea..69c613e7593 100644
--- a/source/blender/draw/modes/pose_mode.c
+++ b/source/blender/draw/modes/pose_mode.c
@@ -111,8 +111,7 @@ static void POSE_cache_init(void *vedata)
                stl->g_data = MEM_callocN(sizeof(*stl->g_data), __func__);
        }
        POSE_PrivateData *ppd = stl->g_data;
-       ppd->transparent_bones = (draw_ctx->v3d->shading.type == OB_WIRE) ||
-                                (draw_ctx->v3d->overlay.arm_flag & 
V3D_OVERLAY_ARM_TRANSP_BONES) != 0;
+       ppd->transparent_bones = (draw_ctx->v3d->shading.type == OB_WIRE);
 
        for (int i = 0; i < 2; ++i) {
                /* Solid bones */
@@ -258,8 +257,6 @@ static void POSE_draw_scene(void *vedata)
        POSE_PassList *psl = ((POSE_Data *)vedata)->psl;
        DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
        DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
-       const DRWContextState *draw_ctx = DRW_context_state_get();
-       const bool transparent_bones = (draw_ctx->v3d->overlay.arm_flag & 
V3D_OVERLAY_ARM_TRANSP_BONES) != 0;
        const bool bone_selection_overlay = 
POSE_is_bone_selection_overlay_active();
 
        if (DRW_state_is_select()) {
@@ -302,11 +299,6 @@ static void POSE_draw_scene(void *vedata)
                        GPU_framebuffer_clear_depth(dfbl->default_fb, 1.0f);
                }
 
-               if (transparent_bones) {
-                       DRW_pass_state_add(psl->bone_solid[1], DRW_STATE_BLEND);
-                       DRW_pass_state_remove(psl->bone_solid[1], 
DRW_STATE_WRITE_DEPTH);
-               }
-
                DRW_draw_pass(psl->bone_envelope[1]);
                DRW_draw_pass(psl->bone_solid[1]);
                DRW_draw_pass(psl->bone_transp[1]);
diff --git a/source/blender/makesdna/DNA_view3d_types.h 
b/source/blender/makesdna/DNA_view3d_types.h
index 2491e2cb0e0..9f8403670d8 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -211,7 +211,7 @@ typedef struct View3DOverlay {
        float weight_paint_mode_opacity;
 
        /* Armature edit/pose mode settings */
-       int arm_flag;
+       int _pad3;
        float xray_alpha_bone;
 
        /* Other settings */
@@ -491,11 +491,6 @@ enum {
        V3D_OVERLAY_EDIT_CU_NORMALS   = (1 << 21),
 };
 
-/* View3DOverlay->arm_flag */
-enum {
-       V3D_OVERLAY_ARM_TRANSP_BONES  = (1 << 0),
-};
-
 /* View3DOverlay->paint_flag */
 enum {
        V3D_OVERLAY_PAINT_WIRE        = (1 << 0),
diff --git a/source/blender/makesrna/intern/rna_space.c 
b/source/blender/makesrna/intern/rna_space.c
index 8a380514e1b..3dd71527e8e 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2951,11 +2951,6 @@ static void rna_def_space_view3d_overlay(BlenderRNA 
*brna)
        RNA_def_property_range(prop, 0.0f, 1.0f);
        RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 
-       prop = RNA_def_property(srna, "show_transparent_bones", PROP_BOOLEAN, 
PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "overlay.arm_flag", 
V3D_OVERLAY_ARM_TRANSP_BONES);
-       RNA_def_property_ui_text(prop, "Transparent Bones", "Display bones as 
transparent");
-       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
-
        prop = RNA_def_property(srna, "texture_paint_mode_opacity", PROP_FLOAT, 
PROP_FACTOR);
        RNA_def_property_float_sdna(prop, NULL, 
"overlay.texture_paint_mode_opacity");
        RNA_def_property_float_default(prop, 1.0f);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to