[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13657] trunk/blender/source/blender: Fix for bug: [#8271] Changes to the texture settings for particle attributes are not updated
Janne Karhu
jhkarh at utu.fi
Tue Feb 12 17:36:08 CET 2008
Revision: 13657
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13657
Author: jhk
Date: 2008-02-12 17:36:03 +0100 (Tue, 12 Feb 2008)
Log Message:
-----------
Fix for bug: [#8271] Changes to the texture settings for particle attributes are not updated
- Material buttons code didn't set particles update flag
- Small change to how particle emit time is interpreted from textures, now the "time" texture output can actually be used for something
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/particle.c
trunk/blender/source/blender/src/buttons_shading.c
Modified: trunk/blender/source/blender/blenkernel/intern/particle.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle.c 2008-02-12 15:34:26 UTC (rev 13656)
+++ trunk/blender/source/blender/blenkernel/intern/particle.c 2008-02-12 16:36:03 UTC (rev 13657)
@@ -3147,11 +3147,14 @@
externtex(mtex, texco, &value, rgba, rgba+1, rgba+2, rgba+3);
if((event & mtex->pmapto) & MAP_PA_TIME){
+ /* the first time has to set the base value for time regardless of blend mode */
if((setvars&MAP_PA_TIME)==0){
- ptex->time=0.0;
- setvars|=MAP_PA_TIME;
+ ptex->time *= 1.0f - var;
+ ptex->time += var * ((neg & MAP_PA_TIME)? 1.0f - value : value);
+ setvars |= MAP_PA_TIME;
}
- ptex->time= texture_value_blend(mtex->def_var,ptex->time,value,var,blend,neg & MAP_PA_TIME);
+ else
+ ptex->time= texture_value_blend(mtex->def_var,ptex->time,value,var,blend,neg & MAP_PA_TIME);
}
if((event & mtex->pmapto) & MAP_PA_LIFE)
ptex->life= texture_value_blend(mtex->def_var,ptex->life,value,var,blend,neg & MAP_PA_LIFE);
Modified: trunk/blender/source/blender/src/buttons_shading.c
===================================================================
--- trunk/blender/source/blender/src/buttons_shading.c 2008-02-12 15:34:26 UTC (rev 13656)
+++ trunk/blender/source/blender/src/buttons_shading.c 2008-02-12 16:36:03 UTC (rev 13657)
@@ -3095,7 +3095,7 @@
ob=base->object;
for(psys=ob->particlesystem.first; psys; psys=psys->next) {
if(psys && ma==give_current_material(ob,psys->part->omat)) {
- psys->flag |= PSYS_INIT;
+ psys->recalc |= PSYS_INIT;
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
}
More information about the Bf-blender-cvs
mailing list