[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13235] trunk/blender/source/blender: Bad bad bug!
Ton Roosendaal
ton at blender.org
Mon Jan 14 16:17:00 CET 2008
Revision: 13235
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13235
Author: ton
Date: 2008-01-14 16:16:59 +0100 (Mon, 14 Jan 2008)
Log Message:
-----------
Bad bad bug!
Newly added strip->scale was never initialized 1.0f on adding, causing
divide by zero in NLA/Action UI.
Bug since september or so... is nobody using NLA? :)
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/action.c
trunk/blender/source/blender/src/editnla.c
Modified: trunk/blender/source/blender/blenkernel/intern/action.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/action.c 2008-01-14 13:48:43 UTC (rev 13234)
+++ trunk/blender/source/blender/blenkernel/intern/action.c 2008-01-14 15:16:59 UTC (rev 13235)
@@ -441,6 +441,8 @@
float length, actlength, repeat, scale;
repeat = (strip->flag & ACTSTRIP_USESTRIDE) ? (1.0f) : (strip->repeat);
+ if(strip->scale == 0.0f) strip->scale= 1.0f;
+
scale = abs(strip->scale); /* scale must be positive (for now) */
actlength = strip->actend-strip->actstart;
Modified: trunk/blender/source/blender/src/editnla.c
===================================================================
--- trunk/blender/source/blender/src/editnla.c 2008-01-14 13:48:43 UTC (rev 13234)
+++ trunk/blender/source/blender/src/editnla.c 2008-01-14 15:16:59 UTC (rev 13235)
@@ -581,7 +581,7 @@
/* simple prevention of zero strips */
if(strip->start>strip->end-2)
strip->end= strip->start+100;
- strip->repeat = 1.0;
+ strip->repeat = strip->scale= 1.0f;
strip->flag = ACTSTRIP_SELECT|ACTSTRIP_LOCK_ACTION;
@@ -620,6 +620,7 @@
/* Initialize the new action block */
strip = MEM_callocN(sizeof(bActionStrip), "bActionStrip");
+ strip->scale= 1.0f;
deselect_nlachannel_keys(0);
More information about the Bf-blender-cvs
mailing list