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:
authormano-wii <germano.costa@ig.com.br>2019-06-27 18:24:03 +0300
committermano-wii <germano.costa@ig.com.br>2019-06-27 18:24:03 +0300
commit7ee5ea77511a800a2442f786839366aa15678276 (patch)
tree915777e744762e1f49d113ecc0b4b41af348b183 /release/scripts/startup/bl_ui/space_image.py
parentc5eceb35829560dcb7e31e0c41bf59ea4feec0c0 (diff)
Fix T65010: Affect options not being displayed in the UV editor snap settings.
Reviewers: brecht, billreynish Reviewed By: brecht Differential Revision: https://developer.blender.org/D5141
Diffstat (limited to 'release/scripts/startup/bl_ui/space_image.py')
-rw-r--r--release/scripts/startup/bl_ui/space_image.py38
1 files changed, 35 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 2aba440bf1d..e3f4ceb7ed1 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -645,11 +645,18 @@ class IMAGE_HT_header(Header):
tool_settings = context.tool_settings
# Snap.
+ snap_uv_element = tool_settings.snap_uv_element
+ act_snap_uv_element = tool_settings.bl_rna.properties['snap_uv_element'].enum_items[snap_uv_element]
+
row = layout.row(align=True)
row.prop(tool_settings, "use_snap", text="")
- row.prop(tool_settings, "snap_uv_element", icon_only=True)
- if tool_settings.snap_uv_element != 'INCREMENT':
- row.prop(tool_settings, "snap_target", text="")
+
+ sub = row.row(align=True)
+ sub.popover(
+ panel="IMAGE_PT_snapping",
+ icon=act_snap_uv_element.icon,
+ text="",
+ )
# Proportional Editing
row = layout.row(align=True)
@@ -811,6 +818,30 @@ class IMAGE_PT_active_mask_point(MASK_PT_point, Panel):
# --- end mask ---
+class IMAGE_PT_snapping(Panel):
+ bl_space_type = 'IMAGE_EDITOR'
+ bl_region_type = 'HEADER'
+ bl_label = "Snapping"
+
+ def draw(self, context):
+ tool_settings = context.tool_settings
+
+ layout = self.layout
+ col = layout.column()
+ col.label(text="Snapping")
+ col.prop(tool_settings, "snap_uv_element", expand=True)
+
+ if tool_settings.snap_uv_element != 'INCREMENT':
+ col.label(text="Target")
+ row = col.row(align=True)
+ row.prop(tool_settings, "snap_target", expand=True)
+
+ col.label(text="Affect")
+ row = col.row(align=True)
+ row.prop(tool_settings, "use_snap_translate", text="Move", toggle=True)
+ row.prop(tool_settings, "use_snap_rotate", text="Rotate", toggle=True)
+ row.prop(tool_settings, "use_snap_scale", text="Scale", toggle=True)
+
class IMAGE_PT_image_properties(Panel):
bl_space_type = 'IMAGE_EDITOR'
@@ -1647,6 +1678,7 @@ classes = (
IMAGE_PT_mask_display,
IMAGE_PT_active_mask_spline,
IMAGE_PT_active_mask_point,
+ IMAGE_PT_snapping,
IMAGE_PT_image_properties,
IMAGE_UL_render_slots,
IMAGE_PT_render_slots,