[Bf-blender-cvs] [3c81572e3d9] master: UI: Move UV Editor Cursor Position to sidebar

William Reynish noreply at git.blender.org
Mon Mar 11 16:37:59 CET 2019


Commit: 3c81572e3d99b759b9851688c32cd7a5e6d37ff1
Author: William Reynish
Date:   Mon Mar 11 16:37:57 2019 +0100
Branches: master
https://developer.blender.org/rB3c81572e3d99b759b9851688c32cd7a5e6d37ff1

UI: Move UV Editor Cursor Position to sidebar

Consistent with the 3D View

===================================================================

M	release/scripts/startup/bl_ui/space_image.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index eff0374a180..856d3254217 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -730,12 +730,6 @@ class IMAGE_PT_view_display(Panel):
             col.prop(ima, "display_aspect", text="Aspect Ratio")
             col.prop(sima, "show_repeat", text="Repeat Image")
 
-        if show_uvedit or show_maskedit:
-            col.separator()
-
-            col = layout.column()
-            col.prop(sima, "cursor_location", text="Cursor Location")
-
         if show_uvedit:
             col.prop(uvedit, "show_pixel_coords", text="Pixel Coordinates")
 
@@ -1286,6 +1280,33 @@ class IMAGE_PT_scope_sample(ImageScopesPanel, Panel):
         col.prop(sima.scopes, "accuracy")
 
 
+class IMAGE_PT_uv_cursor(Panel):
+    bl_space_type = 'IMAGE_EDITOR'
+    bl_region_type = 'UI'
+    bl_category = "Image"
+    bl_label = "3D Cursor"
+
+    @classmethod
+    def poll(cls, context):
+        sima = context.space_data
+
+        return (sima and (sima.show_uvedit) or (sima.show_maskedit))
+
+    def draw(self, context):
+        layout = self.layout
+
+        sima = context.space_data
+        ima = sima.image
+
+
+        uvedit = sima.uv_editor
+
+        col = layout.column()
+
+        col = layout.column()
+        col.prop(sima, "cursor_location", text="Cursor Location")
+
+
 # Grease Pencil properties
 class IMAGE_PT_grease_pencil(AnnotationDataPanel, Panel):
     bl_space_type = 'IMAGE_EDITOR'
@@ -1343,6 +1364,7 @@ classes = (
     IMAGE_PT_view_vectorscope,
     IMAGE_PT_sample_line,
     IMAGE_PT_scope_sample,
+    IMAGE_PT_uv_cursor,
     IMAGE_PT_grease_pencil,
 )



More information about the Bf-blender-cvs mailing list