Added Center button to backdrop controls in node editor's side panel

Inlined backdrop's zoom ui limits and hard limits so that
going to minimun and going back to 100 works
This commit is contained in:
2011-02-01 01:18:16 +00:00
parent dc8078e667
commit 7b3a49af8c
2 changed files with 2 additions and 0 deletions

View File

@@ -188,6 +188,7 @@ class NODE_PT_properties(bpy.types.Panel):
col = layout.column(align=True)
col.label(text="Offset:")
col.operator("node.view_all", text="Center")
col.prop(snode, "backdrop_x", text="X")
col.prop(snode, "backdrop_y", text="Y")
col.operator("node.backimage_move", text="Move")

View File

@@ -2312,6 +2312,7 @@ static void rna_def_space_node(BlenderRNA *brna)
prop= RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
RNA_def_property_range(prop, 0.01f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.01, 100, 1, 2);
RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);