|
|
@ -14,6 +14,7 @@ |
|
|
|
# along with Korman. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
# along with Korman. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
|
|
|
|
|
|
|
|
import bpy |
|
|
|
import bpy |
|
|
|
|
|
|
|
import itertools |
|
|
|
import math |
|
|
|
import math |
|
|
|
import mathutils |
|
|
|
import mathutils |
|
|
|
from PyHSPlasma import * |
|
|
|
from PyHSPlasma import * |
|
|
@ -54,8 +55,12 @@ class AnimationConverter: |
|
|
|
# a lot of temporary objects, but until I see profiling results that this is terrible, I prefer |
|
|
|
# a lot of temporary objects, but until I see profiling results that this is terrible, I prefer |
|
|
|
# to have code that makes sense. |
|
|
|
# to have code that makes sense. |
|
|
|
keyframes = [] |
|
|
|
keyframes = [] |
|
|
|
for pos, scale in zip(pos_keyframes, scale_keyframes): |
|
|
|
for pos, scale in itertools.zip_longest(pos_keyframes, scale_keyframes, fillvalue=None): |
|
|
|
if pos.frame_num == scale.frame_num: |
|
|
|
if pos is None: |
|
|
|
|
|
|
|
keyframes.append((None, scale)) |
|
|
|
|
|
|
|
elif scale is None: |
|
|
|
|
|
|
|
keyframes.append((pos, scale)) |
|
|
|
|
|
|
|
elif pos.frame_num == scale.frame_num: |
|
|
|
keyframes.append((pos, scale)) |
|
|
|
keyframes.append((pos, scale)) |
|
|
|
elif pos.frame_num < scale.frame_num: |
|
|
|
elif pos.frame_num < scale.frame_num: |
|
|
|
keyframes.append((pos, None)) |
|
|
|
keyframes.append((pos, None)) |
|
|
|