Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2011-02-15 18:03:49 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-02-15 18:03:49 +0300
commit78bb53a1bf3aeb000a81ea60c493e31b619b718e (patch)
tree8ca75e213d4179a400b10be6ffc4bd349242cee8 /source/blender/blenkernel
parent86cf6b40162b683a209cef499fd5beb2d69cc6e1 (diff)
Fix for [#26083] Animated Particle Textures have no effect
* Duplicating particle settings didn't duplicate texture slots.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/particle.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index d1d5c13c3dd..5fc22bd842a 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -3566,13 +3566,22 @@ ParticleSettings *psys_new_settings(const char *name, Main *main)
ParticleSettings *psys_copy_settings(ParticleSettings *part)
{
ParticleSettings *partn;
-
+ int a;
+
partn= copy_libblock(part);
if(partn->pd) partn->pd= MEM_dupallocN(part->pd);
if(partn->pd2) partn->pd2= MEM_dupallocN(part->pd2);
partn->effector_weights = MEM_dupallocN(part->effector_weights);
partn->boids = boid_copy_settings(part->boids);
+
+ for(a=0; a<MAX_MTEX; a++) {
+ if(part->mtex[a]) {
+ partn->mtex[a]= MEM_mallocN(sizeof(MTex), "psys_copy_tex");
+ memcpy(partn->mtex[a], part->mtex[a], sizeof(MTex));
+ id_us_plus((ID *)partn->mtex[a]->tex);
+ }
+ }
return partn;
}