diff options
author | Matt Ebb <matt@mke3.net> | 2010-06-22 13:13:30 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-06-22 13:13:30 +0400 |
commit | 8bc1e44e3364ba6d7888c04f97ecea0fad382d41 (patch) | |
tree | a4a7cb617ac9d38d78ac2e23912f47c829678349 /source/blender/makesrna/intern | |
parent | 2849201339f21eec8d5287e3e2199573b625fc40 (diff) |
slight cleaning of texture type changing functionality, done while working on other stuff today
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 32221e51cb9..a12b8c55552 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -160,24 +160,8 @@ static void rna_Texture_nodes_update(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_Texture_type_set(PointerRNA *ptr, int value) { Tex *tex= (Tex*)ptr->data; - - switch(value) { - - case TEX_VOXELDATA: - if (tex->vd == NULL) - tex->vd = BKE_add_voxeldata(); - break; - case TEX_POINTDENSITY: - if (tex->pd == NULL) - tex->pd = BKE_add_pointdensity(); - break; - case TEX_ENVMAP: - if (tex->env == NULL) - tex->env = BKE_add_envmap(); - break; - } - tex->type = value; + tex_set_type(tex, value); } void rna_TextureSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr) |