diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-02-13 15:35:26 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-02-13 15:35:26 +0300 |
commit | 7eb51a012b95df36c3529f6c7699273918fee341 (patch) | |
tree | 5d872df779aa0b79afc55020347f50aa439f86a2 /source/blender/editors/render | |
parent | fed5393043cd8c0c9282cc3bd8e0c8db2aa3ea24 (diff) |
Some more fixes for particle textures:
* Moving a texture slot didn't keep the moved slot active.
* Copy & paste for particle textures didn't work.
* New textures weren't freed properly.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index df32a0619e3..cb4c727c213 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -34,6 +34,7 @@ #include "DNA_material_types.h" #include "DNA_node_types.h" #include "DNA_object_types.h" +#include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "DNA_space_types.h" #include "DNA_world_types.h" @@ -1110,6 +1111,9 @@ void copy_mtex_copybuf(ID *id) mtex= &(((World *)id)->mtex[(int)((World *)id)->texact]); // mtex= wrld->mtex[(int)wrld->texact]; // TODO break; + case ID_PA: + mtex= &(((ParticleSettings *)id)->mtex[(int)((ParticleSettings *)id)->texact]); + break; } if(mtex && *mtex) { @@ -1140,6 +1144,9 @@ void paste_mtex_copybuf(ID *id) mtex= &(((World *)id)->mtex[(int)((World *)id)->texact]); // mtex= wrld->mtex[(int)wrld->texact]; // TODO break; + case ID_PA: + mtex= &(((ParticleSettings *)id)->mtex[(int)((ParticleSettings *)id)->texact]); + break; } if(mtex) { @@ -1204,6 +1211,7 @@ static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op)) Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data; Lamp *la= CTX_data_pointer_get_type(C, "lamp", &RNA_Lamp).data; World *wo= CTX_data_pointer_get_type(C, "world", &RNA_World).data; + ParticleSystem *psys= CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem).data; if (ma) id = &ma->id; @@ -1211,6 +1219,8 @@ static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op)) id = &la->id; else if (wo) id = &wo->id; + else if (psys) + id = &psys->part->id; if (id==NULL) return OPERATOR_CANCELLED; |