diff options
author | Matt Ebb <matt@mke3.net> | 2010-04-06 06:05:54 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-04-06 06:05:54 +0400 |
commit | bfe248b3d629d28fed3798e9f6a42bccb5d40f9e (patch) | |
tree | d4b75ad54067d790cdabaa7e843624b1d423a5af /release | |
parent | ea7fdb55a3e8f088161b218b96220c1cba9380a1 (diff) |
Patch [#21750] Add luma waveform and vectorscope to image view
by Xavier Thomas
This adds the waveform monitor and vectorscope to the image editor 'scopes'
region, bringing it inline (plus a bit more) with sequence editor functionality,
and a big step closer to the end goal of unifying the display code for image/
comp/sequence editor. It's non-intrusive, using the same code paths as
the histogram.
There's still room for more tweaks - I modified the original patch, changing
the openGL immediate mode drawing of the waveform display to vertex arrays for
speed optimisation. Xavier can look at doing this for the vectorscope now too.
Thanks very much Xavier!
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_image.py | 61 |
1 files changed, 59 insertions, 2 deletions
diff --git a/release/scripts/ui/space_image.py b/release/scripts/ui/space_image.py index 1c48b99939d..b29151563d3 100644 --- a/release/scripts/ui/space_image.py +++ b/release/scripts/ui/space_image.py @@ -406,8 +406,43 @@ class IMAGE_PT_view_histogram(bpy.types.Panel): sima = context.space_data - layout.template_histogram(sima, "histogram") + layout.template_histogram(sima.scopes, "histogram") + layout.prop(sima.scopes.histogram, "mode", icon_only=True) +class IMAGE_PT_view_waveform(bpy.types.Panel): + bl_space_type = 'IMAGE_EDITOR' + bl_region_type = 'PREVIEW' + bl_label = "Waveform" + + 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_waveform(sima, "scopes") + sub = layout.row().split(percentage=0.75) + sub.prop(sima.scopes, "waveform_alpha") + sub.prop(sima.scopes, "waveform_mode", text="", icon_only=True) + + +class IMAGE_PT_view_vectorscope(bpy.types.Panel): + bl_space_type = 'IMAGE_EDITOR' + bl_region_type = 'PREVIEW' + bl_label = "Vectorscope" + + 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_vectorscope(sima, "scopes") + layout.prop(sima.scopes, "vectorscope_alpha") class IMAGE_PT_sample_line(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' @@ -423,7 +458,26 @@ class IMAGE_PT_sample_line(bpy.types.Panel): layout.operator("image.sample_line") sima = context.space_data layout.template_histogram(sima, "sample_histogram") + layout.prop(sima.sample_histogram, "mode") + +class IMAGE_PT_scope_sample(bpy.types.Panel): + bl_space_type = 'IMAGE_EDITOR' + bl_region_type = 'PREVIEW' + bl_label = "Scope Samples" + + def poll(self, context): + sima = context.space_data + return sima + def draw(self, context): + layout = self.layout + sima = context.space_data + split = layout.split() + row = split.row() + row.prop(sima.scopes, "use_full_resolution") + row = split.row() + row.active = not sima.scopes.use_full_resolution + row.prop(sima.scopes, "accuracy") class IMAGE_PT_view_properties(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' @@ -614,7 +668,10 @@ classes = [ IMAGE_PT_game_properties, IMAGE_PT_view_properties, IMAGE_PT_view_histogram, - IMAGE_PT_sample_line] + IMAGE_PT_view_waveform, + IMAGE_PT_view_vectorscope, + IMAGE_PT_sample_line, + IMAGE_PT_scope_sample] def register(): |