From c4e7a229589debe81bd4b0eb481a8eb5212ab9bb Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 17 Oct 2013 10:50:54 +0000 Subject: Fix #37091: Reset to default of Sky Texture's Dot freezes it at 0,0,0 --- source/blender/makesrna/intern/rna_nodetree.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/makesrna/intern/rna_nodetree.c') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index bb8e8d87252..7fc53395e61 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3256,6 +3256,7 @@ static void def_sh_tex_sky(StructRNA *srna) {SHD_SKY_NEW, "HOSEK_WILKIE", 0, "Hosek / Wilkie", ""}, {0, NULL, 0, NULL, NULL} }; + static float default_dir[3] = {0.0f, 0.0f, 1.0f}; PropertyRNA *prop; @@ -3270,6 +3271,8 @@ static void def_sh_tex_sky(StructRNA *srna) prop = RNA_def_property(srna, "sun_direction", PROP_FLOAT, PROP_DIRECTION); RNA_def_property_ui_text(prop, "Sun Direction", "Direction from where the sun is shining"); + RNA_def_property_array(prop, 3); + RNA_def_property_float_array_default(prop, default_dir); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "turbidity", PROP_FLOAT, PROP_NONE); -- cgit v1.2.3