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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-11 01:57:33 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-11 01:57:33 +0300
commit7cd4e2781afcc164232ef7b9ea5cd3fc20165dea (patch)
treee729a87c98127a12b7f58810e00324f95e1cae1f /source/blender/makesrna/intern/rna_world.c
parent6ab86a7572435c3df0a3c613bca8a3d0566e39e7 (diff)
RNA
* Finished DNA_lamp_types.h, DNA_world_types.h and DNA_sound_types.h. * Renamed "parent" struct property to "nested", and also remaining "from" usage to "base". * Added a NEVER_NULL subtype for pointers and use it for all properties that apply. * Make sure all structs have a description, and fix any other DOC_BROKEN descriptions, also many other naming consistency improvements.
Diffstat (limited to 'source/blender/makesrna/intern/rna_world.c')
-rw-r--r--source/blender/makesrna/intern/rna_world.c321
1 files changed, 225 insertions, 96 deletions
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index d09776adfa4..261ae6d1fe4 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -30,6 +30,8 @@
#include "rna_internal.h"
+#include "DNA_material_types.h"
+#include "DNA_texture_types.h"
#include "DNA_world_types.h"
#ifdef RNA_RUNTIME
@@ -39,14 +41,88 @@ static void *rna_World_ambient_occlusion_get(PointerRNA *ptr)
return ptr->id.data;
}
+static void *rna_World_stars_get(PointerRNA *ptr)
+{
+ return ptr->id.data;
+}
+
+static void *rna_World_mist_get(PointerRNA *ptr)
+{
+ return ptr->id.data;
+}
+
+static void rna_World_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+{
+ World *wo= (World*)ptr->data;
+ rna_iterator_array_begin(iter, (void*)wo->mtex, sizeof(MTex*), MAX_MTEX, NULL);
+}
+
+static void *rna_World_active_texture_get(PointerRNA *ptr)
+{
+ World *wo= (World*)ptr->data;
+
+ return wo->mtex[(int)wo->texact];
+}
+
#else
-void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
+static void rna_def_world_mtex(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mode_items[] = {
+ static EnumPropertyItem texco_items[] = {
+ {TEXCO_VIEW, "VIEW", "View", "Uses view vector for the texture coordinates."},
+ {TEXCO_GLOB, "GLOBAL", "Global", "Uses global coordinates for the texture coordinates (interior mist)."},
+ {TEXCO_ANGMAP, "ANGMAP", "AngMap", "Uses 360 degree angular coordinates, e.g. for spherical light probes."},
+ {TEXCO_H_SPHEREMAP, "SPHERE", "Sphere", "For 360 degree panorama sky, spherical mapped, only top half."},
+ {TEXCO_H_TUBEMAP, "TUBE", "Tube", "For 360 degree panorama sky, cylindrical mapped, only top half."},
+ {TEXCO_OBJECT, "OBJECT", "Object", "Uses linked object's coordinates for texture coordinates."},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "WorldTextureSlot", "TextureSlot");
+ RNA_def_struct_sdna(srna, "MTex");
+ RNA_def_struct_ui_text(srna, "World Texture Slot", "Texture slot for textures in a World datablock.");
+
+ /* map to */
+ prop= RNA_def_property(srna, "map_to_blend", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_BLEND);
+ RNA_def_property_ui_text(prop, "Map To Blend", "Causes the texture to affect the color progression of the background.");
+
+ prop= RNA_def_property(srna, "map_to_horizon", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_HORIZ);
+ RNA_def_property_ui_text(prop, "Map To Horizon", "Causes the texture to affect the color of the horizon.");
+
+ prop= RNA_def_property(srna, "map_to_zenith_up", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENUP);
+ RNA_def_property_ui_text(prop, "Map To Zenith Up", "Causes the texture to affect the color of the zenith above.");
+
+ prop= RNA_def_property(srna, "map_to_zenith_down", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENDOWN);
+ RNA_def_property_ui_text(prop, "Map To Zenith Down", "Causes the texture to affect the color of the zenith below.");
+
+ /* unused
+ prop= RNA_def_property(srna, "map_to_mist", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_MIST);
+ RNA_def_property_ui_text(prop, "Map To Mist", "Causes the texture to affect the intensity of the mist.");*/
+
+ prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "texco");
+ RNA_def_property_enum_items(prop, texco_items);
+ RNA_def_property_ui_text(prop, "Texture Coordinates", "Textures coordinates used to map the texture with.");
+
+ prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "object");
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
+}
+
+static void rna_def_ambient_occlusion(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem blend_mode_items[] = {
{WO_AOADD, "ADD", "Add", "Add light and shadow."},
{WO_AOSUB, "SUBTRACT", "Subtract", "Subtract light and shadow (needs a normal light to make anything visible.)"},
{WO_AOADDSUB, "BOTH", "Both", "Both lighten and darken."},
@@ -71,13 +147,8 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
srna= RNA_def_struct(brna, "WorldAmbientOcclusion", NULL);
RNA_def_struct_sdna(srna, "World");
- RNA_def_struct_parent(srna, parent);
- RNA_def_struct_ui_text(srna, "Ambient Occlusion", "DOC_BROKEN");
-
- prop= RNA_def_property(parent, "ambient_occlusion", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "WorldAmbientOcclusion");
- RNA_def_property_pointer_funcs(prop, "rna_World_ambient_occlusion_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Ambient Occlusion", "");
+ RNA_def_struct_nested(brna, srna, "World");
+ RNA_def_struct_ui_text(srna, "Ambient Occlusion", "Ambient occlusion settings for a World datablock.");
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_AMB_OCC);
@@ -101,27 +172,27 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aobias");
RNA_def_property_range(prop, 0, 0.5);
- RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding.");
+ RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered).");
prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_thresh");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Threshold", "Samples below this threshold will be considered fully shadowed/unshadowed and skipped.");
+ RNA_def_property_ui_text(prop, "Threshold", "Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC).");
prop= RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Adapt To Speed", "Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled.");
+ RNA_def_property_ui_text(prop, "Adapt To Speed", "Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled (for Raytrace Adaptive QMC).");
prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_error");
RNA_def_property_range(prop, 0.0001, 1);
- RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality.");
+ RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality (for Approximate).");
prop= RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_correction");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation.");
+ RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation (for Approximate).");
prop= RNA_def_property(srna, "falloff", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AODIST);
@@ -129,17 +200,17 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "pixel_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AOCACHE);
- RNA_def_property_ui_text(prop, "Pixel Cache", "Cache AO results in pixels and interpolate over neighbouring pixels for speedup.");
+ RNA_def_property_ui_text(prop, "Pixel Cache", "Cache AO results in pixels and interpolate over neighbouring pixels for speedup (for Approximate).");
prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "aosamp");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Samples", "");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "blend_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aomix");
- RNA_def_property_enum_items(prop, prop_mode_items);
- RNA_def_property_ui_text(prop, "Mode", "");
+ RNA_def_property_enum_items(prop, blend_mode_items);
+ RNA_def_property_ui_text(prop, "Blend Mode", "Blending mode for how AO mixes with material shading.");
prop= RNA_def_property(srna, "color", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aocolor");
@@ -149,7 +220,7 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method");
RNA_def_property_enum_items(prop, prop_sample_method_items);
- RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples.");
+ RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace).");
prop= RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_gather_method");
@@ -159,38 +230,117 @@ void rna_def_ambient_occlusion(BlenderRNA *brna, StructRNA *parent)
prop= RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ao_approx_passes");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce overocclusion.");
+ RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce overocclusion (for Approximate).");
+}
+
+static void rna_def_world_mist(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "WorldMistSettings", NULL);
+ RNA_def_struct_sdna(srna, "World");
+ RNA_def_struct_nested(brna, srna, "World");
+ RNA_def_struct_ui_text(srna, "World Mist", "Mist settings for a World datatblock.");
+
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST);
+ RNA_def_property_ui_text(prop, "Enabled", "Enable mist, occluding objects with the environment color as they are further away.");
+
+ prop= RNA_def_property(srna, "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, "Intensity", "Intensity of the mist.");
+
+ prop= RNA_def_property(srna, "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, "Start", "Starting distance of the mist.");
+
+ prop= RNA_def_property(srna, "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, "Depth", "Depth of the mist.");
+
+ prop= RNA_def_property(srna, "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, "Height", "Factor for a less dense mist with increasing height.");
+}
+
+static void rna_def_world_stars(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem falloff_items[] = {
+ {0, "QUADRATIC", "Quadratic", "Mist uses quadratic progression."},
+ {1, "LINEAR", "Linear", "Mist uses linear progression."},
+ {2, "INVERSE_QUADRATIC", "Inverse Quadratic", "Mist uses inverse quadratic progression."},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "WorldStarsSettings", NULL);
+ RNA_def_struct_sdna(srna, "World");
+ RNA_def_struct_nested(brna, srna, "World");
+ RNA_def_struct_ui_text(srna, "World Stars", "Stars setting for a World datatblock.");
+
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
+ RNA_def_property_ui_text(prop, "Enabled", "Enable starfield generation.");
+
+ prop= RNA_def_property(srna, "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, "Size", "Average screen dimension of stars.");
+
+ prop= RNA_def_property(srna, "min_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, "Minimum Distance", "Minimum distance to the camera for stars.");
+
+ prop= RNA_def_property(srna, "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, "Average Separation", "Average distance between any two stars.");
+
+ prop= RNA_def_property(srna, "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, "Color Randomization", "Randomizes star color.");
+
+ prop= RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mistype");
+ RNA_def_property_enum_items(prop, falloff_items);
+ RNA_def_property_ui_text(prop, "Falloff", "Falloff method for mist.");
+
+ /* unused
+ prop= RNA_def_property(srna, "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, "Color", "Stars color.");*/
}
void RNA_def_world(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
-/*
- float horr, horg, horb, hork;
- float zenr, zeng, zenb, zenk;
- float ambr, ambg, ambb, ambk;
-
- static EnumPropertyItem gameproperty_types_items[] ={
- {PROP_BOOL, "BOOL", "Boolean", ""},
- {PROP_INT, "INT", "Integer", ""},
- {PROP_FLOAT, "FLOAT", "Float", ""},
- {PROP_STRING, "STRING", "String", ""},
- {PROP_TIME, "TIME", "Time", ""},
+
+ static EnumPropertyItem physics_engine_items[] = {
+ {WOPHY_NONE, "NONE", "None", ""},
+ //{WOPHY_ENJI, "ENJI", "Enji", ""},
+ {WOPHY_SUMO, "SUMO", "Sumo (Deprecated)", ""},
+ //{WOPHY_DYNAMO, "DYNAMO", "Dynamo", ""},
+ //{WOPHY_ODE, "ODE", "ODE", ""},
+ {WOPHY_BULLET, "BULLET", "Bullet", ""},
{0, NULL, NULL, NULL}};
-*/
+
srna= RNA_def_struct(brna, "World", "ID");
- RNA_def_struct_ui_text(srna, "World", "DOC_BROKEN");
+ RNA_def_struct_ui_text(srna, "World", "World datablock describing the environment and ambient lighting of a scene.");
rna_def_ipo_common(srna);
-
- rna_def_ambient_occlusion(brna, srna);
-
-/*
- prop= RNA_def_property(srna, "mtex", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "MTex");
- RNA_def_property_ui_text(prop, "MTex", "MTex associated with this world setting.");
-*/
+ rna_def_mtex_common(srna, "rna_World_mtex_begin", "rna_World_active_texture_get", "WorldTextureSlot");
/* colors */
prop= RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);
@@ -232,63 +382,42 @@ void RNA_def_world(BlenderRNA *brna)
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", "");
+ /* physics */
+ prop= RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "physicsEngine");
+ RNA_def_property_enum_items(prop, physics_engine_items);
+ RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine.");
- 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, "physics_gravity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "gravity");
+ RNA_def_property_range(prop, 0.0, 20.0);
+ RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine.");
- 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", "");
+ /* nested structs */
+ prop= RNA_def_property(srna, "ambient_occlusion", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "WorldAmbientOcclusion");
+ RNA_def_property_pointer_funcs(prop, "rna_World_ambient_occlusion_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Ambient Occlusion", "World ambient occlusion settings.");
+
+ prop= RNA_def_property(srna, "mist", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "WorldMistSettings");
+ RNA_def_property_pointer_funcs(prop, "rna_World_mist_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Mist", "World mist settings.");
+
+ prop= RNA_def_property(srna, "stars", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "WorldStarsSettings");
+ RNA_def_property_pointer_funcs(prop, "rna_World_stars_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Stars", "World stars settings.");
+
+ prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
+ RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+ RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this object.");
+
+ rna_def_ambient_occlusion(brna);
+ rna_def_world_mist(brna);
+ rna_def_world_stars(brna);
+ rna_def_world_mtex(brna);
}
#endif