[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17746] branches/animsys2/source/blender/ src/drawaction.c: AnimSys2: Fix crash in Dopesheet, as I overlooked a few cases in previous commit.
Joshua Leung
aligorith at gmail.com
Mon Dec 8 12:19:44 CET 2008
Revision: 17746
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17746
Author: aligorith
Date: 2008-12-08 12:19:44 +0100 (Mon, 08 Dec 2008)
Log Message:
-----------
AnimSys2: Fix crash in Dopesheet, as I overlooked a few cases in previous commit.
Modified Paths:
--------------
branches/animsys2/source/blender/src/drawaction.c
Modified: branches/animsys2/source/blender/src/drawaction.c
===================================================================
--- branches/animsys2/source/blender/src/drawaction.c 2008-12-08 09:16:09 UTC (rev 17745)
+++ branches/animsys2/source/blender/src/drawaction.c 2008-12-08 11:19:44 UTC (rev 17746)
@@ -1217,16 +1217,19 @@
aki.ads= NULL;
aki.actmode= datatype;
+
/* set start/end frames to use for time-based keyframe culling hacks... */
- // FIXME: this needs to be a bit better defined...
- aki.start= G.v2d->cur.xmin - 10;
- aki.end= G.v2d->cur.xmax + 10;
+ if (G.saction->flag & SACTION_HORIZOPTIMISEON) {
+ // FIXME: this needs to be a bit better defined...
+ aki.start= G.v2d->cur.xmin - 10;
+ aki.end= G.v2d->cur.xmax + 10;
+ }
+ else {
+ aki.start= aki.end= 0;
+ }
- /* only return pointer to this data if the culling option is turned on */
- if (G.saction->flag & SACTION_HORIZOPTIMISEON)
- return &aki;
- else
- return NULL;
+ /* always return pointer... */
+ return &aki;
}
static void draw_channel_strips(void)
@@ -2157,6 +2160,10 @@
if (aki == NULL)
return 1;
+ /* if start and end are both 0, then don't care about range */
+ if (IS_EQ(aki->start, 0) && IS_EQ(aki->end, 0))
+ return 1;
+
/* if nla-scaling is in effect, apply appropriate scaling adjustments */
if (aki->ob) {
float frame= get_action_frame_inv(aki->ob, bezt->vec[1][0]);
More information about the Bf-blender-cvs
mailing list