[Bf-blender-cvs] [4116435e2be] blender2.8: Fix T55914: Blender 2.8 Crashes when increasing the repeat count for a track in NLA
Bastien Montagne
noreply at git.blender.org
Wed Jul 11 15:52:00 CEST 2018
Commit: 4116435e2be139d40b27df827cdc9825cedd90f1
Author: Bastien Montagne
Date: Wed Jul 11 15:45:17 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB4116435e2be139d40b27df827cdc9825cedd90f1
Fix T55914: Blender 2.8 Crashes when increasing the repeat count for a track in NLA
Logical mistake in repeated strips drawing code.
===================================================================
M source/blender/editors/space_nla/nla_draw.c
===================================================================
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 3f1bd0db74c..5b68c7b6bb7 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -512,13 +512,13 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
}
/* if action-clip strip, draw lines delimiting repeats too (in the same color as outline) */
- if ((strip->type == NLASTRIP_TYPE_CLIP) && IS_EQF(strip->repeat, 1.0f) == 0) {
+ if ((strip->type == NLASTRIP_TYPE_CLIP) && strip->repeat > 1.0f) {
float repeatLen = (strip->actend - strip->actstart) * strip->scale;
/* only draw lines for whole-numbered repeats, starting from the first full-repeat
* up to the last full repeat (but not if it lies on the end of the strip)
*/
- immBeginAtMost(GWN_PRIM_LINES, 2 * (strip->repeat - 1));
+ immBeginAtMost(GWN_PRIM_LINES, 2 * floorf(strip->repeat));
for (int i = 1; i < strip->repeat; i++) {
float repeatPos = strip->start + (repeatLen * i);
More information about the Bf-blender-cvs
mailing list