[Bf-blender-cvs] [c0cf767460b] blender2.8: Access node backdrop as vector

Campbell Barton noreply at git.blender.org
Mon May 29 06:30:11 CEST 2017


Commit: c0cf767460b80410fb2723ef325e13956f3c9fb2
Author: Campbell Barton
Date:   Mon May 29 14:27:12 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBc0cf767460b80410fb2723ef325e13956f3c9fb2

Access node backdrop as vector

Minor change from 'custom-manipulators' branch, avoid conflicts.

===================================================================

M	release/scripts/startup/bl_ui/space_node.py
M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index b37b3c5705a..2021a69059b 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -395,8 +395,7 @@ class NODE_PT_backdrop(Panel):
 
         col = layout.column(align=True)
         col.label(text="Offset:")
-        col.prop(snode, "backdrop_x", text="X")
-        col.prop(snode, "backdrop_y", text="Y")
+        col.prop(snode, "backdrop_offset", text="")
         col.operator("node.backimage_move", text="Move")
 
         layout.operator("node.backimage_fit", text="Fit")
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index d440ba4e023..0eedcb25b4c 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -4412,14 +4412,10 @@ static void rna_def_space_node(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor");
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL);
 
-	prop = RNA_def_property(srna, "backdrop_x", PROP_FLOAT, PROP_NONE);
+	prop = RNA_def_property(srna, "backdrop_offset", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "xof");
-	RNA_def_property_ui_text(prop, "Backdrop X", "Backdrop X offset");
-	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL);
-
-	prop = RNA_def_property(srna, "backdrop_y", PROP_FLOAT, PROP_NONE);
-	RNA_def_property_float_sdna(prop, NULL, "yof");
-	RNA_def_property_ui_text(prop, "Backdrop Y", "Backdrop Y offset");
+	RNA_def_property_array(prop, 2);
+	RNA_def_property_ui_text(prop, "Backdrop Offset", "Backdrop offset");
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL);
 
 	prop = RNA_def_property(srna, "backdrop_channels", PROP_ENUM, PROP_NONE);




More information about the Bf-blender-cvs mailing list