[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34868] trunk/blender/source/blender/ blenkernel/intern/particle.c: Fix for [#26083] Animated Particle Textures have no effect
Janne Karhu
jhkarh at gmail.com
Tue Feb 15 16:03:50 CET 2011
Revision: 34868
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34868
Author: jhk
Date: 2011-02-15 15:03:49 +0000 (Tue, 15 Feb 2011)
Log Message:
-----------
Fix for [#26083] Animated Particle Textures have no effect
* Duplicating particle settings didn't duplicate texture slots.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/particle.c
Modified: trunk/blender/source/blender/blenkernel/intern/particle.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle.c 2011-02-15 14:38:43 UTC (rev 34867)
+++ trunk/blender/source/blender/blenkernel/intern/particle.c 2011-02-15 15:03:49 UTC (rev 34868)
@@ -3566,13 +3566,22 @@
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;
}
More information about the Bf-blender-cvs
mailing list