diff options
author | Matt Ebb <matt@mke3.net> | 2010-03-12 05:44:18 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-03-12 05:44:18 +0300 |
commit | 86c237b3a5a69a3614c11c46168bc366d661fa49 (patch) | |
tree | 4c0f96fc3b83092bba30aeb27f66a367359e0635 /source/blender/makesrna/intern/rna_texture.c | |
parent | 63c71425b7faee81995a758b54e60320cd4e3ddf (diff) |
Added ability to save and load planar environment maps, rather than only cube.
Diffstat (limited to 'source/blender/makesrna/intern/rna_texture.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 01545735bb3..b5a4ac5db8c 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -349,6 +349,16 @@ static EnumPropertyItem *rna_ImageTexture_filter_itemf(bContext *C, PointerRNA * return item; } +static void rna_Envmap_source_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + Tex *tex= ptr->id.data; + + if (tex->env) + BKE_free_envmapdata(tex->env); + + rna_Texture_update(bmain, scene, ptr); +} + static PointerRNA rna_PointDensity_psys_get(PointerRNA *ptr) { PointDensity *pd= ptr->data; @@ -738,7 +748,7 @@ static void rna_def_environment_map(BlenderRNA *brna) 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, 0, "rna_Texture_update"); + RNA_def_property_update(prop, 0, "rna_Envmap_source_update"); prop= RNA_def_property(srna, "viewpoint_object", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "object"); |