From 3446ef4dde7293bbd09ab54e94ccbe09bdc1729d Mon Sep 17 00:00:00 2001 From: Mark Eggert <72320499+TikiBear@users.noreply.github.com> Date: Sun, 4 Oct 2020 13:29:07 -0700 Subject: [PATCH] Update material.py Correct layer animation timing for FPS other than 30. --- korman/exporter/material.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/korman/exporter/material.py b/korman/exporter/material.py index 4b973e4..7221793 100644 --- a/korman/exporter/material.py +++ b/korman/exporter/material.py @@ -535,8 +535,13 @@ class MaterialConverter: start, end = functools.reduce(lambda x, y: (min(x[0], y[0]), max(x[1], y[1])), (fcurve.range() for fcurve in fcurves)) - atc.begin = start / fps - atc.end = end / fps + # TikiBear - propagate adjustment from AnimationConverter._process_fcurve + if fps == 30.0: + atc.begin = start / fps + atc.end = end / fps + else: + atc.begin = (start * 30) / (fps * fps) + atc.end = (end * 30) / (fps * fps) layer_props = tex_slot.texture.plasma_layer if not layer_props.anim_auto_start: