[Bf-committers] bug fixes again... ;)
Kent Mein
bf-committers@blender.org
Fri, 21 Mar 2003 16:07:00 -0600
--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Ok this is about bug:
http://projects.blender.org/tracker/index.php?func=detail&aid=76&group_id=9&atid
=125
Here is a different fix for the problem which does more what LarstiQ suggested.
Let me know if anyone has a problem with it.
(the one questionable thing is the else case for deltalife. Does that look
correct to everyone?)
Basically all I did was take everything out of the if statement and
came up with a alternate value for deltalife when totkey=1.
Also, take a look at the particles button.
goto animations buttons f7
New effect
change build to particles
See the Botton labled Mult: 0.0
The bubble help states its for switching multiplication on or
off. If thats the case shouldn't it be a button
like the static button.
Kent
--
mein@cs.umn.edu
http://www.cs.umn.edu/~mein
--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=wow
Index: effect.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/blenkernel/intern/effect.c,v
retrieving revision 1.4
diff -u -r1.4 effect.c
--- effect.c 25 Nov 2002 12:01:52 -0000 1.4
+++ effect.c 21 Mar 2003 21:57:52 -0000
@@ -363,42 +363,40 @@
particle_tex(mtex, paf, pa->co, pa->no);
}
- /* keys */
- if(paf->totkey>1) {
-
- deltalife= pa->lifetime/(paf->totkey-1);
- opa= pa;
- pa++;
+ if(paf->totkey>1) deltalife= pa->lifetime/(paf->totkey-1);
+ else deltalife= pa->lifetime;
+
+ opa= pa;
+ pa++;
- b= paf->totkey-1;
- while(b--) {
- /* nieuwe tijd */
- pa->time= opa->time+deltalife;
-
- /* nieuwe plek */
- pa->co[0]= opa->co[0] + deltalife*opa->no[0];
- pa->co[1]= opa->co[1] + deltalife*opa->no[1];
- pa->co[2]= opa->co[2] + deltalife*opa->no[2];
-
- /* nieuwe snelheid */
- pa->no[0]= opa->no[0] + deltalife*force[0];
- pa->no[1]= opa->no[1] + deltalife*force[1];
- pa->no[2]= opa->no[2] + deltalife*force[2];
+ b= paf->totkey-1;
+ while(b--) {
+ /* nieuwe tijd */
+ pa->time= opa->time+deltalife;
- /* snelheid: texture */
- if(mtex && paf->texfac!=0.0) {
- particle_tex(mtex, paf, pa->co, pa->no);
- }
- if(damp!=1.0) {
- pa->no[0]*= damp;
- pa->no[1]*= damp;
- pa->no[2]*= damp;
- }
-
- opa= pa;
- pa++;
- /* opa wordt onderin ook gebruikt */
+ /* nieuwe plek */
+ pa->co[0]= opa->co[0] + deltalife*opa->no[0];
+ pa->co[1]= opa->co[1] + deltalife*opa->no[1];
+ pa->co[2]= opa->co[2] + deltalife*opa->no[2];
+
+ /* nieuwe snelheid */
+ pa->no[0]= opa->no[0] + deltalife*force[0];
+ pa->no[1]= opa->no[1] + deltalife*force[1];
+ pa->no[2]= opa->no[2] + deltalife*force[2];
+
+ /* snelheid: texture */
+ if(mtex && paf->texfac!=0.0) {
+ particle_tex(mtex, paf, pa->co, pa->no);
+ }
+ if(damp!=1.0) {
+ pa->no[0]*= damp;
+ pa->no[1]*= damp;
+ pa->no[2]*= damp;
}
+
+ opa= pa;
+ pa++;
+ /* opa wordt onderin ook gebruikt */
}
if(deform) {
@@ -411,10 +409,11 @@
}
}
- /* de grote vermenigvuldiging */
+ /* the big multiplication */
if(depth<PAF_MAXMULT && paf->mult[depth]!=0.0) {
- /* uit gemiddeld 'mult' deel van de particles ontstaan 'child' nieuwe */
+ /* new 'child' emerges from an average 'mult' part from
+ the particles */
damp = (float)nr;
rt1= (int)(damp*paf->mult[depth]);
rt2= (int)((damp+1.0)*paf->mult[depth]);
--5mCyUwZo2JvN/JJP--