Patch #36622, by Henrik Aarnio: Fit backdrop image to the area dimensions.
[blender.git] / release / scripts / startup / bl_ui / space_node.py
index 59fa52525ad03f728dd8286bc39b8c2b0d3d414e..436170d2ca3eac1bd210d2665f134575d5fd066c 100644 (file)
@@ -152,6 +152,7 @@ class NODE_MT_view(Menu):
             layout.operator("node.backimage_move", text="Backdrop move")
             layout.operator("node.backimage_zoom", text="Backdrop zoom in").factor = 1.2
             layout.operator("node.backimage_zoom", text="Backdrop zoom out").factor = 0.833
+            layout.operator("node.backimage_fit", text="Fit backdrop to available space")
 
         layout.separator()
 
@@ -361,6 +362,8 @@ class NODE_PT_backdrop(Panel):
         col.prop(snode, "backdrop_x", text="X")
         col.prop(snode, "backdrop_y", text="Y")
         col.operator("node.backimage_move", text="Move")
+        
+        layout.operator("node.backimage_fit", text="Fit")
 
 
 class NODE_PT_quality(bpy.types.Panel):