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:
Diffstat (limited to 'release/scripts/startup/bl_ui/space_image.py')
-rw-r--r--release/scripts/startup/bl_ui/space_image.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 3c61adc7cac..50b9585b06a 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -488,6 +488,36 @@ class IMAGE_MT_specials(Menu):
layout.menu("IMAGE_MT_uvs_snap")
+class IMAGE_MT_pivot_pie(Menu):
+ bl_label = "Pivot Point"
+
+ def draw(self, context):
+ layout = self.layout
+ pie = layout.menu_pie()
+
+ pie.prop_enum(context.space_data, "pivot_point", value='CENTER')
+ pie.prop_enum(context.space_data, "pivot_point", value='CURSOR')
+ pie.prop_enum(context.space_data, "pivot_point", value='INDIVIDUAL_ORIGINS')
+ pie.prop_enum(context.space_data, "pivot_point", value='MEDIAN')
+
+
+class IMAGE_MT_uvs_snap_pie(Menu):
+ bl_label = "Snap"
+
+ def draw(self, context):
+ layout = self.layout
+ pie = layout.menu_pie()
+
+ layout.operator_context = 'EXEC_REGION_WIN'
+
+ pie.operator("uv.snap_selected", text="Selected to Pixels", icon='RESTRICT_SELECT_OFF').target = 'PIXELS'
+ pie.operator("uv.snap_cursor", text="Cursor to Pixels", icon='CURSOR').target = 'PIXELS'
+ pie.operator("uv.snap_cursor", text="Cursor to Selected", icon='CURSOR').target = 'SELECTED'
+ pie.operator("uv.snap_selected", text="Selected to Cursor", icon='RESTRICT_SELECT_OFF').target = 'CURSOR'
+ pie.operator("uv.snap_selected", text="Selected to Cursor (Offset)", icon='RESTRICT_SELECT_OFF').target = 'CURSOR_OFFSET'
+ pie.operator("uv.snap_selected", text="Selected to Adjacent Unselected", icon='RESTRICT_SELECT_OFF').target = 'ADJACENT_UNSELECTED'
+
+
class IMAGE_HT_header(Header):
bl_space_type = 'IMAGE_EDITOR'
@@ -1468,6 +1498,8 @@ classes = (
IMAGE_MT_uvs_weldalign,
IMAGE_MT_uvs_select_mode,
IMAGE_MT_specials,
+ IMAGE_MT_pivot_pie,
+ IMAGE_MT_uvs_snap_pie,
IMAGE_HT_header,
MASK_MT_editor_menus,
IMAGE_PT_mask,