From 1785286ecc908366f1c2935cfdc5287571563628 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Thu, 6 Jan 2022 15:42:45 +0300 Subject: Bone Overlay: support changing bone wireframe opacity. When weight painting the bone overlay is extremely intrusive, effectively requiring either extensive use of hiding individual bones, or disabling the whole bone overlay between selections. This addresses the issue by adding a bone opacity slider that is used for the 'wireframe' armature drawing mode. It directly controls the uniform opacity as a straightforward option. Differential Revision: https://developer.blender.org/D11804 --- source/blender/makesrna/intern/rna_space.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/makesrna/intern/rna_space.c') diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 16e9a6208fb..05c1a645823 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -4301,6 +4301,15 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); + prop = RNA_def_property(srna, "bone_wire_alpha", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "overlay.bone_wire_alpha"); + RNA_def_property_ui_text( + prop, "Bone Wireframe Opacity", "Maximim opacity of bones in wireframe display mode"); + RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 2); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); + prop = RNA_def_property(srna, "show_motion_paths", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna( prop, NULL, "overlay.flag", V3D_OVERLAY_HIDE_MOTION_PATHS); -- cgit v1.2.3