diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-04-17 12:35:20 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-04-18 12:22:08 +0300 |
commit | 63bae864f40302b0a303498d26f230caf4f24339 (patch) | |
tree | ae87ecce8868b872d1f2403add5b9d4d5bf538c9 /source/blender/makesrna/intern | |
parent | f7a28f0e11be825e8b1f74720f4d0b35a2d0104b (diff) |
Overlay Engine: Option to Disable AA Ortho Grid
When in Axis alligned orthographic view a grid was always displayed.
With this change the user can enable/disable this grid.
The Grid is always visible and editable, but only rendered active when user is in quad view, or axis aligned ortho view.
Reviewers: brecht, fclem
Maniphest Tasks: T63517
Differential Revision: https://developer.blender.org/D4699
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index ebfe23942d9..d5b12ed5d5b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -747,6 +747,12 @@ static void rna_RegionView3D_view_matrix_set(PointerRNA *ptr, const float *value ED_view3d_from_m4(mat, rv3d->ofs, rv3d->viewquat, &rv3d->dist); } +static bool rna_RegionView3D_is_orthographic_side_view_get(PointerRNA *ptr) +{ + RegionView3D *rv3d = (RegionView3D *)(ptr->data); + return RV3D_VIEW_IS_AXIS(rv3d->view); +} + static void rna_3DViewShading_type_update(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id = ptr->id.data; @@ -2931,6 +2937,11 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like gizmos and outlines"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); + prop = RNA_def_property(srna, "show_ortho_grid", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_ORTHO_GRID); + RNA_def_property_ui_text(prop, "Display Grid", "Show grid in othographic side view"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR); RNA_def_property_ui_text( @@ -3777,6 +3788,11 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Is Perspective", ""); RNA_def_property_flag(prop, PROP_EDITABLE); + prop = RNA_def_property(srna, "is_orthographic_side_view", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "view", 0); + RNA_def_property_boolean_funcs(prop, "rna_RegionView3D_is_orthographic_side_view_get", NULL); + RNA_def_property_ui_text(prop, "Is Axis Aligned", "Is current view an orthographic side view"); + /* This isn't directly accessible from the UI, only an operator. */ prop = RNA_def_property(srna, "use_clip_planes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rflag", RV3D_CLIPPING); |