oops forgot this!
authorRobert Holcomb <bob_holcomb@hotmail.com>
Tue, 23 Mar 2010 23:36:24 +0000 (23:36 +0000)
committerRobert Holcomb <bob_holcomb@hotmail.com>
Tue, 23 Mar 2010 23:36:24 +0000 (23:36 +0000)
release/scripts/ui/space_image.py

index 1e37cb16f817752cbb585de07007ed6f7a891454..ac6a0f3032487f6dbe8734a280ee4443ef89e08c 100644 (file)
@@ -406,6 +406,20 @@ class IMAGE_PT_view_histogram(bpy.types.Panel):
 
         layout.template_histogram(sima, "histogram")
 
+class IMAGE_PT_sample_line(bpy.types.Panel):
+    bl_space_type = 'IMAGE_EDITOR'
+    bl_region_type = 'PREVIEW'
+    bl_label = "Sample Line"
+
+    def poll(self, context):
+        sima = context.space_data
+        return (sima and sima.image)
+
+    def draw(self, context):
+        layout = self.layout
+        layout.operator("image.sample_line")
+        sima = context.space_data
+        layout.template_histogram(sima, "sample_histogram")
 
 class IMAGE_PT_view_properties(bpy.types.Panel):
     bl_space_type = 'IMAGE_EDITOR'
@@ -592,7 +606,8 @@ classes = [
     IMAGE_PT_paint_curve,
     IMAGE_PT_game_properties,
     IMAGE_PT_view_properties,
-    IMAGE_PT_view_histogram]
+    IMAGE_PT_view_histogram,
+    IMAGE_PT_sample_line]
 
 
 def register():