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
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-01-05 07:10:59 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2009-01-05 07:10:59 +0300
commit039fadf66975a6a3d703dd2bc8477a324f244d3d (patch)
tree1254dac3e9526de8e62018d1652fb3447ba22465 /source/blender/makesrna/intern/rna_world.c
parent55f450379e80d893f87c362fb3b420828c049301 (diff)
Added RNA properties for Mist and Stars in World
Diffstat (limited to 'source/blender/makesrna/intern/rna_world.c')
-rw-r--r--source/blender/makesrna/intern/rna_world.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index e37b93881ef..c125c587be8 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -22,6 +22,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include <float.h>
#include <stdlib.h>
#include "RNA_define.h"
@@ -77,6 +78,10 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
RNA_def_property_pointer_funcs(prop, "rna_World_ambient_occlusion_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Ambient Occlusion", "");
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_AMB_OCC);
+ RNA_def_property_ui_text(prop, "Enabled", "");
+
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aodist");
RNA_def_property_range(prop, 0.001, 5000);
@@ -225,6 +230,64 @@ void RNA_def_world(BlenderRNA *brna)
prop= RNA_def_property(srna, "real_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYREAL);
RNA_def_property_ui_text(prop, "Real Sky", "Renders background with a real horizon.");
+
+ /* mist */
+ prop= RNA_def_property(srna, "mist_intensity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "misi");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Mist Intensity", "");
+
+ prop= RNA_def_property(srna, "mist_start", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "miststa");
+ RNA_def_property_range(prop, 0, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
+ RNA_def_property_ui_text(prop, "Mist Intensity", "");
+
+ prop= RNA_def_property(srna, "mist_depth", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "mistdist");
+ RNA_def_property_range(prop, 0, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
+ RNA_def_property_ui_text(prop, "Mist Depth", "");
+
+ prop= RNA_def_property(srna, "mist_height", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "misthi");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Mist Height", "");
+
+ /* stars */
+ prop= RNA_def_property(srna, "star_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "starsize");
+ RNA_def_property_range(prop, 0, 10);
+ RNA_def_property_ui_text(prop, "Star Size", "");
+
+ prop= RNA_def_property(srna, "star_minimum_distance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "starmindist");
+ RNA_def_property_range(prop, 0, 1000);
+ RNA_def_property_ui_text(prop, "Star Minimum Distance", "");
+
+ prop= RNA_def_property(srna, "star_average_separation", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "stardist");
+ RNA_def_property_range(prop, 2, 1000);
+ RNA_def_property_ui_text(prop, "Star Average Separation", "");
+
+ prop= RNA_def_property(srna, "star_color_randomization", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "starcolnoise");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Star Color Randomization", "");
+
+ prop= RNA_def_property(srna, "star_color", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "starr");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Star Color", "");
+
+ /* modes */
+ prop= RNA_def_property(srna, "mist", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST);
+ RNA_def_property_ui_text(prop, "Mist", "");
+
+ prop= RNA_def_property(srna, "stars", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
+ RNA_def_property_ui_text(prop, "Stars", "");
}
#endif