You can sample the pixels of an image in a line with the Sample Line option in UV/Image editor > Properties Region > Sample Line, then dragging a line across an image.

However, I can't figure out how to remove the line afterwards. (I can zoom out and sample a new line far away from the image so it is less distracting, but this can't be the right way to do it)

How to remove or hide the sample line?


2 Answers 2


Basically you have to re-initiate it and then cancel that operation. If you have a line you can just LMB on the button once to activate it then RMB on it again. You can also invoke the space-function search menu and search 'Sample Color' activate it and hit ESC to cancel it.

Sample Line

  • $\begingroup$ Odd, I just tried this (both R and L MB) and it didn't work.. (I tried it during a render, but that shouldn't have anything to do with it?) $\endgroup$
    – gandalf3
    Oct 7, 2013 at 1:46
  • $\begingroup$ My render finished, and now it works.. and I'm reporting this as a bug ;) $\endgroup$
    – gandalf3
    Oct 7, 2013 at 1:49
  • $\begingroup$ Note, bug is now fixed for 2.69 release. $\endgroup$
    – ideasman42
    Oct 7, 2013 at 22:37

Click the Sample Line button again, then RMB to cancel - and the previous line will be gone.

If you want a button to directly remove it, edit the space_image.py script like shown below:

class IMAGE_PT_sample_line(Panel):
    bl_space_type = 'IMAGE_EDITOR'
    bl_region_type = 'PREVIEW'
    bl_label = "Sample Line"

    def poll(cls, context):
        sima = context.space_data
        return (sima and sima.image)

    def draw(self, context):
        layout = self.layout

        sima = context.space_data
        hist = sima.sample_histogram

        # Add a remove button for sample line
        split = layout.split(0.9, align=True)
        sub = layout.row()
        sub.operator_context = 'EXEC_DEFAULT'
        split.operator("image.sample_line", icon='X', text="")

        layout.template_histogram(sima, "sample_histogram")
        row = layout.row(align=True)
        row.prop(hist, "mode", expand=True)
        row.prop(hist, "show_line", text="")
  • $\begingroup$ Odd, I just tried this and it didn't work.. (I was rendering, but that shouldn't have anything to do with it?) $\endgroup$
    – gandalf3
    Oct 7, 2013 at 1:45
  • $\begingroup$ Hm not sure, better wait for a dev to answer this question. There should really be a "remove" button IMO and it should work while rendering as well. $\endgroup$
    – CodeManX
    Oct 7, 2013 at 1:52
  • $\begingroup$ Should I wait to post a bug report? $\endgroup$
    – gandalf3
    Oct 7, 2013 at 1:58
  • $\begingroup$ I tested removing the line with your UI button while rendering, and it works. $\endgroup$
    – gandalf3
    Oct 7, 2013 at 2:08
  • $\begingroup$ Great :) But still, better report and add a link to the tracker. $\endgroup$
    – CodeManX
    Oct 7, 2013 at 2:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .