diff options
author | Jesse Yurkovich <jesse.y@gmail.com> | 2022-04-09 07:40:05 +0300 |
---|---|---|
committer | Jesse Yurkovich <jesse.y@gmail.com> | 2022-04-09 07:40:05 +0300 |
commit | 92c89d7b879229ac01390da068026d0a11d864f1 (patch) | |
tree | 85e6438ad40203fe2aeffcd15e4499715425c0a0 /source/blender/makesrna/intern/rna_space.c | |
parent | 502d16e66788487113ba18f85f44ebd7eff6c492 (diff) |
UDIM: Move UDIM grid controls to the Overlay panel
This change moves the grid panel UI from the View tab up into the
Overlay panel.
Reasons to move to the Overlay panel include:
- Consistency with the grid options in the 3D viewport
- The grid has been drawn as an Overlay for quite some time already
Additional changes that now make sense to have:
- The grid responds to the main Overlay show/hide toggle
- Adds a toggle to show/hide the grid which is consistent with overlays in general
As before, these grid controls are only available for active UV edit
sessions.
Differential Revision: https://developer.blender.org/D11862
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index a74019f9569..d2b8eb203aa 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3497,7 +3497,7 @@ static void rna_def_space_image_uv(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Display Faces", "Display faces over the image"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); - prop = RNA_def_property(srna, "tile_grid_shape", PROP_INT, PROP_NONE); + prop = RNA_def_property(srna, "tile_grid_shape", PROP_INT, PROP_XYZ); RNA_def_property_int_sdna(prop, NULL, "tile_grid_shape"); RNA_def_property_array(prop, 2); RNA_def_property_int_default(prop, 1); @@ -5264,6 +5264,11 @@ static void rna_def_space_image_overlay(BlenderRNA *brna) prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", SI_OVERLAY_SHOW_OVERLAYS); RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like UV Maps and Metadata"); + + prop = RNA_def_property(srna, "show_grid_background", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", SI_OVERLAY_SHOW_GRID_BACKGROUND); + RNA_def_property_ui_text(prop, "Display Background", "Show the grid background and borders"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); } static void rna_def_space_image(BlenderRNA *brna) |