diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-09-26 21:31:14 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-09-26 21:31:20 +0300 |
commit | 5732d9e1dcc08d284d7f9f56be22ad901fd53f22 (patch) | |
tree | b95990cabfe96e39b8a14883c6166e10bd9918fb /source/blender/makesrna/intern/rna_space.c | |
parent | ebd234eee5d7fdae6d7a5efa56171f6ab773a9e1 (diff) |
Wireframe/Xray: Make Xray option local to wireframe mode
This commit make the Xray option for the wireframe different from the other
shading mode. This makes it possible to rapidly switch between wireframe +
Xray and Solid mode without Xray.
Xray alpha is also decoupled.
Both variables are duplicated and exposed separately through RNA.
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 1afcafca26b..c4dded4955e 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2551,6 +2551,12 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show X-Ray", "Show whole scene transparent"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_xray_wireframe", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SHADING_XRAY_WIREFRAME); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_ui_text(prop, "Show X-Ray", "Show whole scene transparent"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "xray_alpha", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "xray_alpha"); RNA_def_property_float_default(prop, 0.5); @@ -2559,6 +2565,14 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "xray_alpha_wireframe", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "xray_alpha_wire"); + RNA_def_property_float_default(prop, 0.5); + RNA_def_property_ui_text(prop, "X-Ray Alpha", "Amount of alpha to use"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "use_scene_lights", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SHADING_SCENE_LIGHTS); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); @@ -2772,11 +2786,6 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Wire", "Use wireframe display in painting modes"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_OCCLUDE_WIRE); - RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display in edit mode"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "show_weight", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_WEIGHT); RNA_def_property_ui_text(prop, "Show Weights", "Display weights in editmode"); |