diff options
author | Matt Ebb <matt@mke3.net> | 2010-01-19 04:32:06 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-01-19 04:32:06 +0300 |
commit | aab8196a1c16a1695a168c486fc6883953f97722 (patch) | |
tree | bcd6de7e916feba5f068936eb7e289605b0fb87a /release | |
parent | 849024df83602758f134695495eb0b19a6993421 (diff) |
Finished some work from the weekend to keep local tree clean..
* Added a generic 'histogram' ui control, currently available in new image editor
'scopes' region (shortcut P). Shows the histogram of the currently viewed image.
It's a baby step in unifying the functionality and code from the sequence editor,
so eventually we can migrate the sequence preview to the image editor too,
like compositor.
Still a couple of rough edges to tweak, regarding when it updates. Also would
be very nice to have this region as a partially transparent overlapping region...
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_image.py | 18 | ||||
-rw-r--r-- | release/scripts/ui/space_userpref.py | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/release/scripts/ui/space_image.py b/release/scripts/ui/space_image.py index 0a8784732a6..e21b1c3d1da 100644 --- a/release/scripts/ui/space_image.py +++ b/release/scripts/ui/space_image.py @@ -35,6 +35,7 @@ class IMAGE_MT_view(bpy.types.Menu): show_uvedit = sima.show_uvedit layout.operator("image.properties", icon='MENU_PANEL') + layout.operator("image.scopes", icon='MENU_PANEL') layout.separator() @@ -386,6 +387,21 @@ class IMAGE_PT_game_properties(bpy.types.Panel): col.separator() col.prop(ima, "mapping", expand=True) +class IMAGE_PT_view_histogram(bpy.types.Panel): + bl_space_type = 'IMAGE_EDITOR' + bl_region_type = 'PREVIEW' + bl_label = "Histogram" + + def poll(self, context): + sima = context.space_data + return (sima and sima.image) + + def draw(self, context): + layout = self.layout + + sima = context.space_data + + layout.template_histogram(sima, "histogram") class IMAGE_PT_view_properties(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' @@ -417,6 +433,7 @@ class IMAGE_PT_view_properties(bpy.types.Panel): col.prop(sima, "draw_repeated", text="Repeat") if show_uvedit: col.prop(uvedit, "normalized_coordinates", text="Normalized") + elif show_uvedit: col.label(text="Coordinates:") col.prop(uvedit, "normalized_coordinates", text="Normalized") @@ -562,3 +579,4 @@ bpy.types.register(IMAGE_PT_paint_stroke) bpy.types.register(IMAGE_PT_paint_curve) bpy.types.register(IMAGE_PT_game_properties) bpy.types.register(IMAGE_PT_view_properties) +bpy.types.register(IMAGE_PT_view_histogram) diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index ca89878c9d9..c8672d3b95e 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -735,6 +735,7 @@ class USERPREF_PT_theme(bpy.types.Panel): col = split.column() col.prop(image, "back") + col.prop(image, "scope_back") col.prop(image, "button") col = split.column() |