Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Blackbourn <chrisbblend@gmail.com>2022-10-12 01:26:14 +0300
committerChris Blackbourn <chrisbblend@gmail.com>2022-10-12 01:27:41 +0300
commitb7decab07ef85aeda1be3391c2e85e3265b12091 (patch)
tree06951d5ae1ac8c58d60b35e4fc18c8672d218610 /release
parentc2256bf7f714bbd41388af3e184b3d84b496fbf3 (diff)
UV: add grid shape source to the uv editor, and add new "pixel" option
This change is part of a wider set of changes to implement Grid and Pixel snapping in the UV Editor. This particular change adds a new third option, `pixel grid`, to the previous grid options, `dynamic grid` and `fixed grid`. Maniphest Tasks : T78391 Differential Revision: https://developer.blender.org/D16197
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_image.py33
1 files changed, 10 insertions, 23 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index cefa4bf7d1d..fcbd7bb423d 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -1528,36 +1528,23 @@ class IMAGE_PT_overlay_guides(Panel):
layout.active = overlay.show_overlays
row = layout.row()
- row_el = row.column()
- row_el.prop(overlay, "show_grid_background", text="Grid")
+ row.prop(overlay, "show_grid_background", text="Grid")
if overlay.show_grid_background:
- layout.use_property_split = True
-
- col = layout.column(align=False, heading="Grid Over Image")
- col.use_property_decorate = False
- row = col.row(align=True)
- sub = row.row(align=True)
- sub.prop(uvedit, "show_grid_over_image", text="")
+ sub = row.row()
+ sub.prop(uvedit, "show_grid_over_image", text="Over Image")
sub.active = sima.image is not None
- col = layout.column(align=False, heading="Fixed Subdivisions")
- col.use_property_decorate = False
+ layout.row().prop(uvedit, "grid_shape_source", expand=True)
- row = col.row(align=True)
- sub = row.row(align=True)
- sub.prop(uvedit, "use_custom_grid", text="")
- if uvedit.use_custom_grid:
- row = layout.row()
- row.use_property_split = True
- row.use_property_decorate = False
- sub = sub.row(align=True)
- sub.prop(uvedit, "custom_grid_subdivisions", text="")
+ layout.use_property_split = True
+ layout.use_property_decorate = False
row = layout.row()
- row.use_property_split = True
- row.use_property_decorate = False
- row.prop(uvedit, "tile_grid_shape", text="Tiles")
+ row.prop(uvedit, "custom_grid_subdivisions", text="Fixed Subdivisions")
+ row.active = uvedit.grid_shape_source == 'FIXED'
+
+ layout.prop(uvedit, "tile_grid_shape", text="Tiles")
class IMAGE_PT_overlay_uv_edit(Panel):