Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2011-02-10 13:24:05 +0300
committerJoshua Leung <aligorith@gmail.com>2011-02-10 13:24:05 +0300
commit763e8d0bec3c49ca3f1644ef551f1e0cfdf30adf (patch)
tree5979691625299810cfae2fc497b115fc0af81e1c /source
parent5dffb646756cf179cbc702f628e26db2384db0a0 (diff)
Bugfix [#26004] compositor: backdrop zoom factor too small
The backdrop zoom factor for new node-editor instances was not set (i.e. was default initialised to 0). Now, this gets set to 1.0. Also, set the property default in RNA to match this.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_node/space_node.c3
-rw-r--r--source/blender/makesrna/intern/rna_space.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index dab6568bea6..1ac745b8c0e 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -98,6 +98,9 @@ static SpaceLink *node_new(const bContext *UNUSED(C))
snode= MEM_callocN(sizeof(SpaceNode), "initnode");
snode->spacetype= SPACE_NODE;
+ /* backdrop */
+ snode->zoom = 1.0f;
+
/* header */
ar= MEM_callocN(sizeof(ARegion), "header for node");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 2cade184a8e..78434643028 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2325,6 +2325,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_float_default(prop, 1.0f);
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");