#include "DNA_lamp_types.h"
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
static void rna_Lamp_buffer_size_set(PointerRNA *ptr, int value)
la->bufsize &= (~15); /* round to multiple of 16 */
}
+static void *rna_Lamp_sunsky_settings_get(PointerRNA *ptr)
+{
+ return ptr->id.data;
+}
+
#else
-void RNA_def_lamp(BlenderRNA *brna)
+static void rna_def_lamp_sunsky_settings(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_skycolorspace_items[] = {
+ {0, "SMPTE", "SMPTE", ""},
+ {1, "REC709", "REC709", ""},
+ {2, "CIE", "CIE", ""},
+ {0, NULL, NULL, NULL}};
+
+ static EnumPropertyItem prop_blendmode_items[] = {
+ {0, "MIX", "Mix", ""},
+ {1, "ADD", "Add", ""},
+ {2, "MULTIPLY", "Multiply", ""},
+ {3, "SUBTRACT", "Subtract", ""},
+ {4, "SCREEN", "Screen", ""},
+ {5, "DIVIDE", "Divide", ""},
+ {6, "DIFFERENCE", "Difference", ""},
+ {7, "DARKEN", "Darken", ""},
+ {8, "LIGHTEN", "Lighten", ""},
+ {9, "OVERLAY", "Overlay", ""},
+ {10, "DODGE", "Dodge", ""},
+ {11, "BURN", "Burn", ""},
+ {12, "HUE", "Hue", ""},
+ {13, "SATURATION", "Saturation", ""},
+ {14, "VALUE", "Value", ""},
+ {15, "COLOR", "Color", ""},
+ {0, NULL, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "SunskySettings", NULL);
+ RNA_def_struct_sdna(srna, "Lamp");
+ RNA_def_struct_ui_text(srna, "Sun/Sky Settings", "Sun/Sky related settings for the lamp.");
+
+ prop= RNA_def_property(srna, "sky_colorspace", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_skycolorspace_items);
+ RNA_def_property_ui_text(prop, "Sky Color Space", "");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "skyblendtype");
+ RNA_def_property_enum_items(prop, prop_blendmode_items);
+ RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ /* Number values */
+
+ prop= RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 20.0f);
+ RNA_def_property_ui_text(prop, "Horizon Brightness", "horizon brightness");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Horizon Spread", "horizon Spread");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Sun Brightness", "Sun Brightness");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Sun Size", "Sun Size");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Back Light", "Backscatter Light");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "Sun Intensity", "Sun Intensity");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "atm_turbidity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 30.0f);
+ RNA_def_property_ui_text(prop, "Turbidity", "Sky Turbidity");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "atm_inscattering_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Inscatter", "Scatter contribution factor");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "atm_extinction_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Extinction", "Extinction scattering contribution factor");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "atm_distance_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 500.0f);
+ RNA_def_property_ui_text(prop, "Distance", "Multiplier to convert blender units to physical distance");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "sky_blend_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "skyblendfac");
+ RNA_def_property_range(prop, 0.0f, 2.0f);
+ RNA_def_property_ui_text(prop, "Sky Blend Factor", "Blend factor with sky");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0f, 20.0f);
+ RNA_def_property_ui_text(prop, "Sky Exposure", "Strength of sky shading exponential exposure correction.");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ /* boolean */
+
+ prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_SKY);
+ RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+
+ prop= RNA_def_property(srna, "atmosphere", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_AP);
+ RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on Atmosphere");
+ RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
+}
+
+void rna_def_lamp(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
- {LA_LOCAL, "LOCAL", "Local", ""},
+ {LA_LOCAL, "OMNI", "Omni", ""},
{LA_SUN, "SUN", "Sun", ""},
{LA_SPOT, "SPOT", "Spot", ""},
{LA_HEMI, "HEMI", "Hemi", ""},
{LA_SHAD_RAY, "RAYSHADOW", "Ray Shadow", "Use ray tracing for shadow."},
{0, NULL, NULL, NULL}};
static EnumPropertyItem prop_raysampmethod_items[] = {
- {LA_SAMP_CONSTANT, "CONSTANT", "Constant", ""},
- {LA_SAMP_HALTON, "HALTON", "Halton", ""},
- {LA_SHAD_RAY, "LA_SAMP_HAMMERSLEY", "Hammersley", ""},
+ {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", "Constant Jittered", ""},
+ {LA_SAMP_HALTON, "ADAPTIVE_QMC", "Adaptive QMC", ""},
+ {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", "Constant QMC", ""},
{0, NULL, NULL, NULL}};
static EnumPropertyItem prop_areashape_items[] = {
{LA_AREA_SQUARE, "SQUARE", "Square", ""},
{4, "4BUFF", "4", "Sample 4 Shadow Buffers."},
{9, "9BUFF", "9", "Sample 9 Shadow Buffers."},
{0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_skycolorspace_items[] = {
- {0, "SMPTE", "SMPTE", ""},
- {1, "REC709", "REC709", ""},
- {2, "CIE", "CIE", ""},
- {0, NULL, NULL, NULL}};
- static EnumPropertyItem prop_blendmode_items[] = {
- {0, "MIX", "Mix", ""},
- {1, "ADD", "Add", ""},
- {2, "MULTIPLY", "Multiply", ""},
- {3, "SUBTRACT", "Subtract", ""},
- {4, "SCREEN", "Screen", ""},
- {5, "DIVIDE", "Divide", ""},
- {6, "DIFFERENCE", "Difference", ""},
- {7, "DARKEN", "Darken", ""},
- {8, "LIGHTEN", "Lighten", ""},
- {9, "OVERLAY", "Overlay", ""},
- {10, "DODGE", "Dodge", ""},
- {11, "BURN", "Burn", ""},
- {12, "HUE", "Hue", ""},
- {13, "SATURATION", "Saturation", ""},
- {14, "VALUE", "Value", ""},
- {15, "COLOR", "Color", ""},
- {0, NULL, NULL, NULL}};
static EnumPropertyItem prop_fallofftype_items[] = {
{LA_FALLOFF_CONSTANT, "CONSTANT", "Constant", ""},
{LA_FALLOFF_INVLINEAR, "INVLINEAR", "Inverse Linear", ""},
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of Lamp.");
-
- prop= RNA_def_property(srna, "sky_colorspace", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_skycolorspace_items);
- RNA_def_property_ui_text(prop, "Sky Color Space", "");
-
- prop= RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "skyblendtype");
- RNA_def_property_enum_items(prop, prop_blendmode_items);
- RNA_def_property_ui_text(prop, "Sky Blend Type", "Blend type for how sky is combined with world sky");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "area_shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_areashape_items);
RNA_def_property_ui_text(prop, "Area Shape", "Shape of the Area lamp");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "ray_samp_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_raysampmethod_items);
RNA_def_property_ui_text(prop, "Ray Sample Method", "The Method in how rays are sampled");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "buffer_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "buftype");
RNA_def_property_enum_items(prop, prop_shadbuftype_items);
RNA_def_property_ui_text(prop, "Buffer Type", "Type of Shadow Buffer.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
RNA_def_property_ui_text(prop, "Filter Type", "Type of Shadow Buffer Filter.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "buffers", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_numbuffer_items);
RNA_def_property_ui_text(prop, "Sample Buffers", "Number of Buffers to sample.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* needs to be able to create curve mapping */
RNA_def_property_enum_items(prop, prop_fallofftype_items);
RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance.");
-
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
+
prop= RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
/* Number values */
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Distance", "Distance that the lamp emits light.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "linear_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Linear Attenuation", "Linear distance attentuation.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "quadratic_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Quadratic Attenuation", "Quadratic distance attentuation.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotblend");
RNA_def_property_range(prop, 0.0f ,1.0f);
RNA_def_property_ui_text(prop, "Spot Blend", "The softeness of the spotlight edge.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotsize");
RNA_def_property_range(prop, 1.0f ,180.0f);
RNA_def_property_ui_text(prop, "Spot Size", "The angle of the spotlight beam in degrees.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Clip Start", "Distance that the buffer calculations start.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Clip End", "Distance that the buffer calculations finish.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Bias", "Shadow Map sampling bias.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "soft", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Soft", "Size of shadow sampling area.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp");
RNA_def_property_range(prop, 1,16);
RNA_def_property_ui_text(prop, "Samples", "Number of shadow map samples.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "ray_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_samp");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Ray Samples", "Amount of samples taken extra (samples x samples).");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "ray_sampy", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1,16);
RNA_def_property_ui_text(prop, "Ray Samples Y", "Amount of samples taken extra (samples x samples).");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "area_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Area Size", "Size of the area of the Area Lamp.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "area_sizey", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Area Size Y", "Size of the area of the Area Lamp.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "adapt_thresh", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Adapt Threshold", "Threshold for Adaptive Sampling.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "buffer_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bufsize");
RNA_def_property_range(prop, 512, 10240);
RNA_def_property_ui_text(prop, "Buffer Size", "Sets the size of the shadow buffer to nearest multiple of 16");
RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "haint");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Halo Intensity", "Intensity of Spot Halo");
-
- prop= RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Hor. Bright", "horizon brightness");
-
- prop= RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Hor. Spread", "horizon Spread");
-
- prop= RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Bright", "Sun Brightness");
-
- prop= RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Size", "Sun Size");
-
- prop= RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Back Light", "Backscatter Light");
-
- prop= RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Intens", "Sun Intensity");
-
- prop= RNA_def_property(srna, "atm_turbidity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 30.0f);
- RNA_def_property_ui_text(prop, "Turbidity", "Sky Tubidity");
-
- prop= RNA_def_property(srna, "atm_inscattering_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Inscatter", "Scatter contribution factor");
-
- prop= RNA_def_property(srna, "atm_extinction_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Extinction", "Extinction scattering contribution factor");
-
- prop= RNA_def_property(srna, "atm_distance_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 500.0f);
- RNA_def_property_ui_text(prop, "Atmos Distance", "Scale blender distance to real distance");
-
- prop= RNA_def_property(srna, "sky_blend_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "skyblendfac");
- RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Sky Blend Factor", "Blend factor with sky");
-
- prop= RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Sky Exposure", "Exposure correction");
-
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
/*short sky_colorspace, pad4;*/
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Color", "");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Shadow Color", "");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
/* Booleans */
prop= RNA_def_property(srna, "auto_clip_start", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
RNA_def_property_ui_text(prop, "Autoclip Start", "Automatically Sets Clip start to the nearest pixel.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "auto_clip_end", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
RNA_def_property_ui_text(prop, "Autoclip End", "Automatically Sets Clip end to the farthest away pixel.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "umbra", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_UMBRA);
RNA_def_property_ui_text(prop, "Umbra", "Emphasise parts in full shadow.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "dither", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_DITHER);
RNA_def_property_ui_text(prop, "Dither", "Use 2x2 dithering for sampling.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "jitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_JITTER);
RNA_def_property_ui_text(prop, "Jitter", "Use noise for sampling.");
-
- prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_SKY);
- RNA_def_property_ui_text(prop, "sky", "Apply sun effect on sky");
-
- prop= RNA_def_property(srna, "atmosphere", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_AP);
- RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on Atmosphere");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
/* mode */
prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_HALO);
RNA_def_property_ui_text(prop, "Halo", "Lamp creates a halo.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER);
RNA_def_property_ui_text(prop, "Layer", "Lamp is only used on the Scene layer the lamp is on.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NEG);
RNA_def_property_ui_text(prop, "Negative", "Lamp casts negative light.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_SPEC);
RNA_def_property_ui_text(prop, "Specular", "Lamp creates specular highlights.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF);
RNA_def_property_ui_text(prop, "Diffuse", "Lamp does diffuse shading.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "only_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_ONLYSHADOW);
RNA_def_property_ui_text(prop, "Only Shadow", "Lamp only creates shadows.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "shadow", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, prop_shadow_items);
RNA_def_property_ui_text(prop, "Shadow", "Method to compute lamp shadow.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "sphere", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SPHERE);
- RNA_def_property_ui_text(prop, "Sphere", "Sets square spotbundles.");
+ RNA_def_property_ui_text(prop, "Sphere", "Sets light intensity to zero beyond lamp distance.");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
prop= RNA_def_property(srna, "square", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SQUARE);
- RNA_def_property_ui_text(prop, "Square", "Sets light intensity to zero beyond lamp distance.");
+ RNA_def_property_ui_text(prop, "Square", "Casts a square spot light shape");
+ RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
+
+ /* sun/sky */
+ prop= RNA_def_property(srna, "sunsky", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "SunskySettings");
+ RNA_def_property_pointer_funcs(prop, "rna_Lamp_sunsky_settings_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Sun/Sky Settings", "Sun/Sky related settings for the lamp.");
+
+}
+
+void RNA_def_lamp(BlenderRNA *brna)
+{
+ rna_def_lamp(brna);
+ rna_def_lamp_sunsky_settings(brna);
}
#endif
#include "DNA_material_types.h"
+#include "WM_types.h"
+
#ifdef RNA_RUNTIME
static void rna_Material_mode_halo_set(PointerRNA *ptr, int value)
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Diffuse Color", "");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "specr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Specular Color", "");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "mirror_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "mirr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Mirror Color", "");
-
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+
prop= RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ambr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Ambient Color", "");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Alpha", "");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
}
static void rna_def_material_diffuse(StructRNA *srna, PropertyRNA *prop)
RNA_def_property_enum_sdna(prop, NULL, "diff_shader");
RNA_def_property_enum_items(prop, prop_diff_shader_items);
RNA_def_property_ui_text(prop, "Diffuse Shader Model", "");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "diffuse_reflection", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ref");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Diffuse Reflection", "Amount of diffuse reflection.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "roughness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 3.14f);
RNA_def_property_ui_text(prop, "Roughness", "Oren-Nayar Roughness");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "params1_4", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "param");
RNA_def_property_array(prop, 4);
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Params 1-4", "Parameters used for diffuse and specular Toon, and diffuse Fresnel shaders. Check documentation for details.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "darkness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Darkness", "Minnaert darkness.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
static void rna_def_material_raymirror(StructRNA *srna, PropertyRNA *prop)
prop= RNA_def_property(srna, "mode_ray_mirror", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYMIRROR); /* use bitflags */
RNA_def_property_ui_text(prop, "Ray Mirror Mode", "Toggle raytrace mirror.");
-
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+
prop= RNA_def_property(srna, "ray_mirror", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ray Mirror", "Sets the amount mirror reflection for raytrace.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_mirror_fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Ray Mirror Fresnel", "Power of Fresnel for mirror reflection.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_mirror_fresnel_fac", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir_i");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ray Mirror Fresnel Factor", "Blending factor for Fresnel.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_mirror_gloss", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ray Mirror Gloss", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_mirror_gloss_aniso", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aniso_gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ray Mirror Gloss Aniso", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_mirror_gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_mir");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "Ray Mirror Gloss Samples", "Number of cone samples averaged for blurry reflections.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_mirror_adapt_thresh", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ray Mirror Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_mirror_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_depth");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Ray Mirror Depth", "Maximum allowed number of light inter-reflections.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_mirror_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist_mir");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Ray Mirror Max Dist", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_mirror_fadeto", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir");
RNA_def_property_enum_items(prop, prop_fadeto_mir_items);
RNA_def_property_ui_text(prop, "Ray Mirror End Fade-out", "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
static void rna_def_material_raytra(StructRNA *srna, PropertyRNA *prop)
prop= RNA_def_property(srna, "mode_ray_transparency", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYTRANSP); /* use bitflags */
RNA_def_property_ui_text(prop, "Ray Transparency Mode", "Enables raytracing for transparent refraction rendering.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ang");
RNA_def_property_range(prop, 1.0f, 3.0f);
RNA_def_property_ui_text(prop, "Ray Transparency IOR", "Sets angular index of refraction for raytraced refraction.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Ray Transparency Fresnel", "Power of Fresnel for transparency (Ray or ZTransp).");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_fresnel_fac", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra_i");
RNA_def_property_range(prop, 1.0f, 5.0f);
RNA_def_property_ui_text(prop, "Ray Transparency Fresnel Factor", "Blending factor for Fresnel.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_gloss", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gloss_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ray Transparency Gloss", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_tra");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "Ray Transparency Gloss Samples", "Number of cone samples averaged for blurry refractions.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_adapt_thresh", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ray Transparency Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_depth_tra");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Ray Transparency Depth", "Maximum allowed number of light inter-refractions.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_filter", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "filter");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ray Transparency Filter", "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption).");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_limit", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tx_limit");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Ray Transparency Limit", "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled).");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tx_falloff");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Ray Transparency Falloff", "Falloff power for transmissivity filter effect (1.0 is linear).");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_transparency_specular_opacity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spectra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ray Transparency Specular Opacity", "Makes specular areas opaque on transparent materials.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
static void rna_def_material_halo(StructRNA *srna, PropertyRNA *prop)
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode", "Enables halo rendering of material.");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_mode_halo_set");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "halo_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "hasize");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Halo Size", "Sets the dimension of the halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_hardness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "har");
RNA_def_property_range(prop, 0, 127);
RNA_def_property_ui_text(prop, "Halo Hardness", "Sets the hardness of the halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_add", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "add");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Halo Add", "Sets the strength of the add effect.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_rings", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ringc");
RNA_def_property_range(prop, 0, 24);
RNA_def_property_ui_text(prop, "Halo Rings", "Sets the number of rings rendered over the halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_lines", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "linec");
RNA_def_property_range(prop, 0, 250);
RNA_def_property_ui_text(prop, "Halo Lines", "Sets the number of star shaped lines rendered over the halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_star_tips", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "starc");
RNA_def_property_range(prop, 3, 50);
RNA_def_property_ui_text(prop, "Halo Star Tips", "Sets the number of points on the star shaped halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed1");
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Halo Seed", "Randomizes ring dimension and line location.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_flare_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_FLARE); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode Flare", "Renders halo as a lensflare.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_flare_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flaresize");
RNA_def_property_range(prop, 0.1f, 25.0f);
RNA_def_property_ui_text(prop, "Halo Flare Size", "Sets the factor by which the flare is larger than the halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_flare_subsize", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "subsize");
RNA_def_property_range(prop, 0.1f, 25.0f);
RNA_def_property_ui_text(prop, "Halo Flare Subsize", "Sets the dimension of the subflares, dots and circles.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_flare_boost", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flareboost");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Halo Flare Boost", "Gives the flare extra strength.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_flare_seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed2");
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Halo Flare Seed", "Specifies an offset in the flare seed table.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_flares_sub", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "flarec");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "Halo Flares Sub", "Sets the number of subflares.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_rings_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_RINGS); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode Rings", "Renders rings over halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_lines_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_LINES); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode Lines", "Renders star shaped lines over halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_star_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STAR); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode Star", "Renders halo as a star.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_texture_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOTEX); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode Texture", "Gives halo a texture.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_puno_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOPUNO); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode Puno", "Uses the vertex normal to specify the dimension of the halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_xalpha_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_XALPHA); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode Extreme Alpha", "Uses extreme alpha.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_shaded_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SHADE); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode Shaded", "Lets halo receive light and shadows.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "halo_soft_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SOFT); /* use bitflags */
RNA_def_property_ui_text(prop, "Halo Mode Soft", "Softens the halo.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
RNA_def_property_float_sdna(prop, NULL, "inertia");
RNA_def_property_range(prop, 0.01, 10.0);
RNA_def_property_ui_text(prop, "Radius", "Radius for Bounding sphere and Fh/Fh Rot.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "no_sleeping", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_COLLISION_RESPONSE);
prop= RNA_def_property(srna, "restrict_view", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW);
RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "restrict_select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_SELECT);
prop= RNA_def_property(srna, "draw_keys_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_DRAWKEYSEL);
RNA_def_property_ui_text(prop, "Draw Keys Selected", "Limit the drawing of object keys to selected.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "track_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_POWERTRACK);
prop= RNA_def_property(srna, "dupli_verts_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT);
RNA_def_property_ui_text(prop, "Dupli Verts Rotation", "Rotate dupli according to vertex normal.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "dupli_faces_inherit_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT);
RNA_def_property_float_sdna(prop, NULL, "dupfacesca");
RNA_def_property_range(prop, 0.001, 10000.0);
RNA_def_property_ui_text(prop, "Dupli Faces Scale", "Scale the DupliFace objects.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
RNA_def_property_float_sdna(prop, NULL, "sf");
RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Time Offset", "Animation offset in frames for ipo's and dupligroup instances.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "time_offset_edit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_OB);
prop= RNA_def_property(srna, "time_offset_parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARENT);
RNA_def_property_ui_text(prop, "Time Offset Parent", "Apply the time offset to this objects parent relationship.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "time_offset_particle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARTICLE);
RNA_def_property_ui_text(prop, "Time Offset Particle", "Let the time offset work on the particle effect.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
prop= RNA_def_property(srna, "time_offset_add_parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARENTADD);
RNA_def_property_ui_text(prop, "Time Offset Add Parent", "Add the parents time offset value");
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
/* script link */
RNA_def_property_enum_sdna(prop, NULL, "dt");
RNA_def_property_enum_items(prop, drawtype_items);
RNA_def_property_ui_text(prop, "Maximum Draw Type", "Maximum draw type to display object with in viewport.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "draw_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_BOUNDBOX);
RNA_def_property_ui_text(prop, "Draw Bounds", "Displays the object's bounds.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "draw_bounds_types", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "boundtype");
RNA_def_property_enum_items(prop, boundtype_items);
RNA_def_property_ui_text(prop, "Draw Bounds Type", "Object boundary display type.");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+
prop= RNA_def_property(srna, "draw_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWNAME);
RNA_def_property_ui_text(prop, "Draw Name", "Displays the object's name.");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+
prop= RNA_def_property(srna, "draw_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_AXIS);
RNA_def_property_ui_text(prop, "Draw Axis", "Displays the object's center and axis");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+
prop= RNA_def_property(srna, "draw_texture_space", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_TEXSPACE);
RNA_def_property_ui_text(prop, "Draw Texture Space", "Displays the object's texture space.");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+
prop= RNA_def_property(srna, "draw_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWWIRE);
RNA_def_property_ui_text(prop, "Draw Wire", "Adds the object's wireframe over solid drawing.");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+
prop= RNA_def_property(srna, "draw_transparent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWTRANSP);
RNA_def_property_ui_text(prop, "Draw Transparent", "Enables transparent materials for the object (Mesh only).");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+
prop= RNA_def_property(srna, "x_ray", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWXRAY);
RNA_def_property_ui_text(prop, "X-Ray", "Makes the object draw in front of others.");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+
/* action / pose / nla */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);