diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_image.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 72 |
1 files changed, 31 insertions, 41 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 785a841a0e6..1dd50c979e2 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -1453,66 +1453,57 @@ class IMAGE_PT_uv_cursor(Panel): col.prop(sima, "cursor_location", text="Location") -class IMAGE_PT_udim_grid(Panel): +class IMAGE_PT_overlay(Panel): bl_space_type = 'IMAGE_EDITOR' - bl_region_type = 'UI' - bl_category = "View" - bl_label = "UDIM Grid" - - @classmethod - def poll(cls, context): - sima = context.space_data - - return sima.show_uvedit + bl_region_type = 'HEADER' + bl_label = "Overlays" + bl_ui_units_x = 13 def draw(self, context): - layout = self.layout - - sima = context.space_data - uvedit = sima.uv_editor - - layout.use_property_split = True - layout.use_property_decorate = False + pass - col = layout.column() - col.prop(uvedit, "tile_grid_shape", text="Grid Shape") -class IMAGE_PT_custom_grid(Panel): +class IMAGE_PT_overlay_guides(Panel): bl_space_type = 'IMAGE_EDITOR' - bl_region_type = 'UI' - bl_category = "View" - bl_label = "Custom Grid" + bl_region_type = 'HEADER' + bl_label = "Guides" + bl_parent_id = 'IMAGE_PT_overlay' @classmethod def poll(cls, context): sima = context.space_data - return sima.show_uvedit - def draw_header(self, context): - sima = context.space_data - uvedit = sima.uv_editor - self.layout.prop(uvedit, "use_custom_grid", text="") + return sima.show_uvedit def draw(self, context): layout = self.layout sima = context.space_data + overlay = sima.overlay uvedit = sima.uv_editor - layout.use_property_split = True - layout.use_property_decorate = False + layout.active = overlay.show_overlays - col = layout.column() - col.prop(uvedit, "custom_grid_subdivisions", text="Subdivisions") + row = layout.row() + row_el = row.column() + row_el.prop(overlay, "show_grid_background", text="Grid") -class IMAGE_PT_overlay(Panel): - bl_space_type = 'IMAGE_EDITOR' - bl_region_type = 'HEADER' - bl_label = "Overlays" - bl_ui_units_x = 13 + if overlay.show_grid_background: + layout.use_property_split = True + col = layout.column(align=False, heading="Fixed Subdivisions") + col.use_property_decorate = False - def draw(self, context): - pass + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(uvedit, "use_custom_grid", text="") + sub = sub.row(align=True) + sub.active = uvedit.use_custom_grid + sub.prop(uvedit, "custom_grid_subdivisions", text="") + + row = layout.row() + row.use_property_split = True + row.use_property_decorate = False + row.prop(uvedit, "tile_grid_shape", text="Tiles") class IMAGE_PT_overlay_uv_edit(Panel): @@ -1689,9 +1680,8 @@ classes = ( IMAGE_PT_scope_sample, IMAGE_PT_uv_cursor, IMAGE_PT_annotation, - IMAGE_PT_udim_grid, - IMAGE_PT_custom_grid, IMAGE_PT_overlay, + IMAGE_PT_overlay_guides, IMAGE_PT_overlay_uv_edit, IMAGE_PT_overlay_uv_edit_geometry, IMAGE_PT_overlay_texture_paint, |