Patch #36622, by Henrik Aarnio: Fit backdrop image to the area dimensions.

A new operator to alter the backdrop zoom level so that it fits fully within the node editor area, and centers the image.
Shortcut alt-home, as home is used for fitting stuff into the view everywhere.
This commit is contained in:
Lukas Toenne
2013-09-01 09:50:56 +00:00
parent fe427f0561
commit 2b6d2bf322
4 changed files with 60 additions and 0 deletions

View 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):