diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 121 |
2 files changed, 124 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index e7be5dcba36..a6487fd5f63 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -283,6 +283,12 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) case NC_WORLD: ED_area_tag_redraw(sa); sbuts->preview= 1; + case NC_LAMP: + ED_area_tag_redraw(sa); + sbuts->preview= 1; + case NC_TEXTURE: + ED_area_tag_redraw(sa); + sbuts->preview= 1; } } diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 55336b5e8b4..57f44017450 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -37,6 +37,8 @@ #include "DNA_texture_types.h" #include "DNA_world_types.h" +#include "WM_types.h" + #ifdef RNA_RUNTIME StructRNA *rna_Texture_refine(struct PointerRNA *ptr) @@ -134,11 +136,13 @@ static void rna_def_color_ramp_element(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "r"); RNA_def_property_array(prop, 4); RNA_def_property_ui_text(prop, "Color", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "position", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "pos"); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Position", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_color_ramp(BlenderRNA *brna) @@ -162,11 +166,13 @@ static void rna_def_color_ramp(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "data", "tot"); RNA_def_property_struct_type(prop, "ColorRampElement"); RNA_def_property_ui_text(prop, "Elements", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ipotype"); RNA_def_property_enum_items(prop, prop_interpolation_items); RNA_def_property_ui_text(prop, "Interpolation", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_texmapping(BlenderRNA *brna) @@ -180,30 +186,37 @@ static void rna_def_texmapping(BlenderRNA *brna) prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "loc"); RNA_def_property_ui_text(prop, "Location", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ROTATION); RNA_def_property_float_sdna(prop, NULL, "rot"); RNA_def_property_ui_text(prop, "Rotation", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "size"); RNA_def_property_ui_text(prop, "Scale", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "min"); RNA_def_property_ui_text(prop, "Minimum", "Minimum value for clipping"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "max"); RNA_def_property_ui_text(prop, "Maximum", "Maximum value for clipping"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "has_minimum", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MIN); RNA_def_property_ui_text(prop, "Has Minimum", "Whether to use minimum clipping value"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "has_maximum", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MAX); RNA_def_property_ui_text(prop, "Has Maximum", "Whether to use maximum clipping value"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_mtex(BlenderRNA *brna) @@ -238,64 +251,77 @@ static void rna_def_mtex(BlenderRNA *brna) RNA_def_property_struct_type(prop, "Texture"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Texture", "Texture datablock used by this texture slot."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_TextureSlot_name_get", "rna_TextureSlot_name_length", NULL); RNA_def_property_ui_text(prop, "Name", "Texture slot name."); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_struct_name_property(srna, prop); + RNA_def_property_update(prop, NC_TEXTURE, NULL); /* mapping */ prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "ofs"); RNA_def_property_ui_range(prop, -10, 10, 10, 2); RNA_def_property_ui_text(prop, "Offset", "Fine tunes texture mapping X, Y and Z locations."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_VECTOR); RNA_def_property_ui_range(prop, -100, 100, 10, 2); RNA_def_property_ui_text(prop, "Size", "Sets scaling for the texture's X, Y and Z sizes."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "r"); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "blendtype"); RNA_def_property_enum_items(prop, prop_blend_type_items); RNA_def_property_ui_text(prop, "Blend Type", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "stencil", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_STENCIL); RNA_def_property_ui_text(prop, "Stencil", "Use this texture as a blending value on the next texture."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "negate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_NEGATIVE); RNA_def_property_ui_text(prop, "Negate", "Inverts the values of the texture to reverse its effect."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "no_rgb", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_RGBTOINT); RNA_def_property_ui_text(prop, "No RGB", "Converts texture RGB values to intensity (gray) values."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "def_var"); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Default Value", "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard."); - + RNA_def_property_update(prop, NC_TEXTURE, NULL); + prop= RNA_def_property(srna, "variable_factor", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "varfac"); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Variable Factor", "Amount texture affects other values."); - + RNA_def_property_update(prop, NC_TEXTURE, NULL); + prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "colfac"); RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Color Factor", "Amount texture affects color values."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "norfac"); RNA_def_property_range(prop, 0, 25); RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_filter_size_common(StructRNA *srna) @@ -306,12 +332,14 @@ static void rna_def_filter_size_common(StructRNA *srna) prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_FILTER_MIN); RNA_def_property_ui_text(prop, "Use Filter", "Use Filter Size as a minimal filter value in pixels"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "filtersize"); RNA_def_property_range(prop, 0.1, 50.0); RNA_def_property_ui_range(prop, 0.1, 50.0, 1, 0.2); RNA_def_property_ui_text(prop, "Filter Size", "Multiplies the filter size used by MIP Map and Interpolation"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_environment_map_common(StructRNA *srna) @@ -328,12 +356,14 @@ static void rna_def_environment_map_common(StructRNA *srna) RNA_def_property_enum_sdna(prop, NULL, "stype"); RNA_def_property_enum_items(prop, prop_source_items); RNA_def_property_ui_text(prop, "Source", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); /* XXX: move this to specific types if needed */ prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "ima"); RNA_def_property_struct_type(prop, "Image"); RNA_def_property_ui_text(prop, "Image", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_environment_map(BlenderRNA *brna) @@ -356,24 +386,28 @@ static void rna_def_environment_map(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_type_items); RNA_def_property_ui_text(prop, "Type", ""); + RNA_def_property_update(prop, NC_TEXTURE, 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.01, FLT_MAX); RNA_def_property_ui_range(prop, 0.01, 50, 100, 2); RNA_def_property_ui_text(prop, "Clip Start", "Objects nearer than this are not visible to map."); + RNA_def_property_update(prop, NC_TEXTURE, 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.01, FLT_MAX); RNA_def_property_ui_range(prop, 0.10, 20000, 100, 2); RNA_def_property_ui_text(prop, "Clip End", "Objects further than this are not visible to map."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "viewscale"); RNA_def_property_range(prop, 0.01, FLT_MAX); RNA_def_property_ui_range(prop, 0.5, 5, 100, 2); RNA_def_property_ui_text(prop, "Zoom", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); /* XXX: EnvMap.notlay */ @@ -381,10 +415,12 @@ static void rna_def_environment_map(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "cuberes"); RNA_def_property_range(prop, 50, 4096); RNA_def_property_ui_text(prop, "Resolution", "Pixel resolution of the rendered environment map."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 0, 5); RNA_def_property_ui_text(prop, "Depth", "Number of times a map will be rendered recursively (mirror effects.)"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static EnumPropertyItem prop_noise_basis_items[] = { @@ -425,33 +461,38 @@ static void rna_def_texture_clouds(BlenderRNA *brna) RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2); RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "noisedepth"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_range(prop, 0, 6, 0, 2); RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation"); - + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisebasis"); RNA_def_property_enum_items(prop, prop_noise_basis_items); RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisetype"); RNA_def_property_enum_items(prop, prop_noise_type); RNA_def_property_ui_text(prop, "Noise Type", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "stype"); RNA_def_property_enum_items(prop, prop_clouds_stype); RNA_def_property_ui_text(prop, "Color", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.001, 0.1); RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2); RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_texture_wood(BlenderRNA *brna) @@ -481,37 +522,44 @@ static void rna_def_texture_wood(BlenderRNA *brna) RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2); RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "turbul"); RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2); RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisebasis"); RNA_def_property_enum_items(prop, prop_noise_basis_items); RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisetype"); RNA_def_property_enum_items(prop, prop_noise_type); RNA_def_property_ui_text(prop, "Noise Type", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "stype"); RNA_def_property_enum_items(prop, prop_wood_stype); RNA_def_property_ui_text(prop, "Pattern", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noisebasis2", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisebasis2"); RNA_def_property_enum_items(prop, prop_wood_noisebasis2); RNA_def_property_ui_text(prop, "Noise Basis 2", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.001, 0.1); RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2); RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } @@ -541,43 +589,51 @@ static void rna_def_texture_marble(BlenderRNA *brna) RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2); RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "turbul"); RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2); RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "noisedepth"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_range(prop, 0, 6, 0, 2); RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisetype"); RNA_def_property_enum_items(prop, prop_noise_type); RNA_def_property_ui_text(prop, "Noise Type", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "stype"); RNA_def_property_enum_items(prop, prop_marble_stype); RNA_def_property_ui_text(prop, "Pattern", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisebasis"); RNA_def_property_enum_items(prop, prop_noise_basis_items); RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noisebasis2", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisebasis2"); RNA_def_property_enum_items(prop, prop_marble_noisebasis2); RNA_def_property_ui_text(prop, "Noise Basis 2", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.001, 0.1); RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2); RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal."); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } @@ -595,12 +651,14 @@ static void rna_def_texture_magic(BlenderRNA *brna) RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2); RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "noisedepth"); RNA_def_property_range(prop, 0, INT_MAX); RNA_def_property_ui_range(prop, 0, 6, 0, 2); RNA_def_property_ui_text(prop, "Noise Depth", "Sets the depth of the cloud calculation"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_texture_blend(BlenderRNA *brna) @@ -626,10 +684,12 @@ static void rna_def_texture_blend(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "stype"); RNA_def_property_enum_items(prop, prop_blend_progression); RNA_def_property_ui_text(prop, "Progression", "Sets the style of the color blending"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "flip_axis", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_FLIPBLEND); RNA_def_property_ui_text(prop, "Flip Axis", "Flips the texture's X and Y axis"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_texture_stucci(BlenderRNA *brna) @@ -652,27 +712,32 @@ static void rna_def_texture_stucci(BlenderRNA *brna) RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2); RNA_def_property_ui_text(prop, "Turbulence", "Sets the turbulence of the bandnoise and ringnoise types"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisebasis"); RNA_def_property_enum_items(prop, prop_noise_basis_items); RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "noisesize"); RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2); RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisetype"); RNA_def_property_enum_items(prop, prop_noise_type); RNA_def_property_ui_text(prop, "Noise Type", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "stype", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "stype"); RNA_def_property_enum_items(prop, prop_stucci_stype); RNA_def_property_ui_text(prop, "Pattern", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_texture_noise(BlenderRNA *brna) @@ -704,37 +769,45 @@ static void rna_def_texture_image(BlenderRNA *brna) prop= RNA_def_property(srna, "mipmap", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_MIPMAP); RNA_def_property_ui_text(prop, "MIP Map", "Uses auto-generated MIP maps for the image"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "mipmap_gauss", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_GAUSS_MIP); RNA_def_property_ui_text(prop, "MIP Map Gauss", "Uses Gauss filter to sample down MIP maps"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "interpolation", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_INTERPOL); RNA_def_property_ui_text(prop, "Interpolation", "Interpolates pixels using Area filter"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); /* XXX: I think flip_axis should be a generic Texture property, enabled for all the texture types */ prop= RNA_def_property(srna, "flip_axis", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_IMAROT); RNA_def_property_ui_text(prop, "Flip Axis", "Flips the texture's X and Y axis"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_USEALPHA); RNA_def_property_ui_text(prop, "Use Alpha", "Uses the alpha channel information in the image"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "calculate_alpha", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_CALCALPHA); RNA_def_property_ui_text(prop, "Calculate Alpha", "Calculates an alpha channel based on RGB values in the image"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "invert_alpha", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_NEGALPHA); RNA_def_property_ui_text(prop, "Invert Alpha", "Inverts all the alpha values in the image"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); rna_def_filter_size_common(srna); prop= RNA_def_property(srna, "normal_map", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP); RNA_def_property_ui_text(prop, "Normal Map", "Uses image RGB values for normal mapping"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); /* XXX: mtex->normapspace "Sets space of normal map image" "Normal Space %t|Camera %x0|World %x1|Object %x2|Tangent %x3" * not sure why this goes in mtex instead of texture directly? */ @@ -743,38 +816,46 @@ static void rna_def_texture_image(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "extend"); RNA_def_property_enum_items(prop, prop_image_extension); RNA_def_property_ui_text(prop, "Extension", "Sets how the image is stretched in the texture"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "repeat_x", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "xrepeat"); RNA_def_property_range(prop, 1, 512); RNA_def_property_ui_text(prop, "Repeat X", "Sets a repetition multiplier in the X direction"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "repeat_y", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "yrepeat"); RNA_def_property_range(prop, 1, 512); RNA_def_property_ui_text(prop, "Repeat Y", "Sets a repetition multiplier in the Y direction"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "mirror_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_REPEAT_XMIR); RNA_def_property_ui_text(prop, "Mirror X", "Mirrors the image repetition on the X direction"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "mirror_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_REPEAT_YMIR); RNA_def_property_ui_text(prop, "Mirror Y", "Mirrors the image repetition on the Y direction"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "checker_odd", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_CHECKER_ODD); RNA_def_property_ui_text(prop, "Checker Odd", "Sets odd checker tiles"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "checker_even", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_CHECKER_EVEN); RNA_def_property_ui_text(prop, "Checker Even", "Sets even checker tiles"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "checker_distance", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "checkerdist"); RNA_def_property_range(prop, 0.0, 0.99); RNA_def_property_ui_range(prop, 0.0, 0.99, 0.1, 0.01); RNA_def_property_ui_text(prop, "Checker Distance", "Sets distance between checker tiles"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); #if 0 @@ -786,6 +867,7 @@ static void rna_def_texture_image(BlenderRNA *brna) RNA_def_property_array(prop, 4); RNA_def_property_range(prop, -10, 10); RNA_def_property_ui_text(prop, "Crop Rectangle", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); #endif @@ -794,30 +876,35 @@ static void rna_def_texture_image(BlenderRNA *brna) RNA_def_property_range(prop, -10.0, 10.0); RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2); RNA_def_property_ui_text(prop, "Crop Minimum X", "Sets minimum X value to crop the image"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "crop_min_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cropymin"); RNA_def_property_range(prop, -10.0, 10.0); RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2); RNA_def_property_ui_text(prop, "Crop Minimum Y", "Sets minimum Y value to crop the image"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "crop_max_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cropxmax"); RNA_def_property_range(prop, -10.0, 10.0); RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2); RNA_def_property_ui_text(prop, "Crop Maximum X", "Sets maximum X value to crop the image"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "crop_max_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cropymax"); RNA_def_property_range(prop, -10.0, 10.0); RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2); RNA_def_property_ui_text(prop, "Crop Maximum Y", "Sets maximum Y value to crop the image"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "ima"); RNA_def_property_struct_type(prop, "Image"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Image", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_texture_plugin(BlenderRNA *brna) @@ -846,6 +933,7 @@ static void rna_def_texture_environment_map(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "env"); RNA_def_property_struct_type(prop, "EnvironmentMap"); RNA_def_property_ui_text(prop, "Environment Map", "Gets the environment map associated with this texture"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); rna_def_filter_size_common(srna); } @@ -871,52 +959,62 @@ static void rna_def_texture_musgrave(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "stype"); RNA_def_property_enum_items(prop, prop_musgrave_type); RNA_def_property_ui_text(prop, "Type", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "highest_dimension", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "mg_H"); RNA_def_property_range(prop, 0.0001, 2); RNA_def_property_ui_text(prop, "Highest Dimension", "Highest fractal dimension"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "lacunarity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "mg_lacunarity"); RNA_def_property_range(prop, 0, 6); RNA_def_property_ui_text(prop, "Lacunarity", "Gap between succesive frequencies"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "octaves", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "mg_octaves"); RNA_def_property_range(prop, 0, 8); RNA_def_property_ui_text(prop, "Octaves", "Number of frequencies used"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "mg_offset"); RNA_def_property_range(prop, 0, 6); RNA_def_property_ui_text(prop, "Offset", "The fractal offset"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "mg_gain"); RNA_def_property_range(prop, 0, 6); RNA_def_property_ui_text(prop, "Gain", "The gain multiplier"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ns_outscale"); RNA_def_property_range(prop, 0, 10); RNA_def_property_ui_text(prop, "Noise Intensity", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "noisesize"); RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2); RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisebasis"); RNA_def_property_enum_items(prop, prop_noise_basis_items); RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.001, 0.1); RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2); RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_texture_voronoi(BlenderRNA *brna) @@ -951,37 +1049,44 @@ static void rna_def_texture_voronoi(BlenderRNA *brna) RNA_def_property_array(prop, 4); RNA_def_property_range(prop, -2, 2); RNA_def_property_ui_text(prop, "Feature Weights", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "minkovsky_exponent", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "vn_mexp"); RNA_def_property_range(prop, 0.01, 10); RNA_def_property_ui_text(prop, "Minkovsky Exponent", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "distance_metric", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "vn_distm"); RNA_def_property_enum_items(prop, prop_distance_metric_items); RNA_def_property_ui_text(prop, "Distance Metric", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "coloring", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "vn_coltype"); RNA_def_property_enum_items(prop, prop_coloring_items); RNA_def_property_ui_text(prop, "Coloring", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "ns_outscale"); RNA_def_property_range(prop, 0.01, 10); RNA_def_property_ui_text(prop, "Noise Intensity", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "noisesize"); RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2); RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.001, 0.1); RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2); RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_texture_distorted_noise(BlenderRNA *brna) @@ -997,27 +1102,32 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "dist_amount"); RNA_def_property_range(prop, 0, 10); RNA_def_property_ui_text(prop, "Distortion Amount", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "noisesize"); RNA_def_property_range(prop, 0.0001, FLT_MAX); RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2); RNA_def_property_ui_text(prop, "Noise Size", "Sets scaling for noise input"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisebasis"); RNA_def_property_enum_items(prop, prop_noise_basis_items); RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "noise_distortion", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "noisebasis2"); RNA_def_property_enum_items(prop, prop_noise_basis_items); RNA_def_property_ui_text(prop, "Noise Distortion", "Sets the noise basis for the distortion"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.001, 0.1); RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2); RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal"); + RNA_def_property_update(prop, NC_TEXTURE, NULL); } static void rna_def_texture(BlenderRNA *brna) @@ -1051,20 +1161,24 @@ static void rna_def_texture(BlenderRNA *brna) 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", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "coba"); RNA_def_property_struct_type(prop, "ColorRamp"); RNA_def_property_ui_text(prop, "Color Ramp", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "brightness", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "bright"); RNA_def_property_range(prop, 0, 2); RNA_def_property_ui_text(prop, "Brightness", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); prop= RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.01, 5); RNA_def_property_ui_text(prop, "Contrast", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); /* XXX: would be nicer to have this as a color selector? but the values can go past [0,1]. */ @@ -1073,6 +1187,7 @@ static void rna_def_texture(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_range(prop, 0, 2); RNA_def_property_ui_text(prop, "RGB Factor", ""); + RNA_def_property_update(prop, NC_TEXTURE, NULL); rna_def_animdata_common(srna); |