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:
authorAaron Carlisle <carlisle.b3d@gmail.com>2021-08-09 22:30:55 +0300
committerAaron Carlisle <carlisle.b3d@gmail.com>2021-08-09 22:33:06 +0300
commit2d867426b1b7e28b58bf0c84119679c73f08175f (patch)
tree38ecf773a3f328a9bdb92d096a4973b38c793229 /release/scripts/startup/bl_ui/space_clip.py
parentce95a2b148ed498a7e8ac7fb6565d7e5f21fca6f (diff)
UI: Clip Editor: Expose 2D Cursor Location to RNA and UI
To be consistent with the image editors and 3D viewport the cursor location can be changed from the sidebar. This was missing from the clip editor, but support has been added in this commit. Previously, the only way to precisely set the cursor was to call the set cursor operator then use the redo panel to adjust the value.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_clip.py')
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 7bac0556fb9..a1e5b509295 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -1075,6 +1075,31 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
layout.prop(stab, "filter_type")
+class CLIP_PT_2d_cursor(Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_category = "View"
+ bl_label = "2D Cursor"
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ if CLIP_PT_clip_view_panel.poll(context):
+ return sc.pivot_point == 'CURSOR' or sc.mode == 'MASK'
+
+ def draw(self, context):
+ layout = self.layout
+
+ sc = context.space_data
+
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ col = layout.column()
+ col.prop(sc, "cursor_location", text="Location")
+
+
class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
@@ -1862,6 +1887,7 @@ classes = (
CLIP_PT_proxy,
CLIP_PT_footage,
CLIP_PT_stabilization,
+ CLIP_PT_2d_cursor,
CLIP_PT_mask,
CLIP_PT_mask_layers,
CLIP_PT_mask_display,