1
$\begingroup$

In several graphics app such as Photoshop (or even other apps like Word), the view zoom is indicated at the bottom of the window:

enter image description here

Photoshop

enter image description here

Word for Mac

However, in Blender's image viewer, I haven't been able to find such a thing.

The only thing I could find is the View menu, which doesn't tell you which setting you are on but lets you click on one of them:

enter image description here

If I select "Zoom 1:1" then go return to the View menu, "Zoom 1:1" will not have a checkmark next to it

Is there a way to display the percentage of the zoom currently applied to the image editor?

$\endgroup$
5
$\begingroup$

Blender doesn't offer a way to show the zoom level but we can use python to display it if we want.

The simplest way is to add a panel -

import bpy
import math

class Image_PT_zoom(bpy.types.Panel):
    bl_idname = "Image_PT_zoom"
    bl_label = "Image Zoom"
    bl_space_type = 'IMAGE_EDITOR'
    bl_region_type = 'UI'

    def draw(self, context):
        zoom = context.space_data.zoom[0]*100
        zoom_h = context.space_data.zoom[1]*100
        if math.isclose(zoom,zoom_h,rel_tol=0.001):
            self.layout.label(text="{:.1f}%".format(zoom))
        else:
            self.layout.label(text="Width:  {:.1f}%".format(zoom))
            self.layout.label(text="Height: {:.1f}%".format(zoom_h))

def register():
    bpy.utils.register_class(Image_PT_zoom)

def unregister():
    bpy.utils.unregister_class(Image_PT_zoom)

register()

You can find this as an addon here.

$\endgroup$
  • $\begingroup$ I tried pasting your code in the Python Console but got error messages, so I installed from file, but I cannot see where the zoom info is displayed? imgur.com/a/BNwJ7 $\endgroup$ – MicroMachine Sep 19 '17 at 20:41
  • $\begingroup$ In the properties sidebar N - the script above should have had a register() call at the end, add that. example $\endgroup$ – sambler Sep 20 '17 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.