Browse Source

Fix syntax goof that eats opacity animations.

pull/246/head
Adam Johnson 3 years ago
parent
commit
a893ac2725
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 6
      korman/exporter/animation.py
  2. 1
      korman/exporter/material.py

6
korman/exporter/animation.py

@ -614,8 +614,12 @@ class AnimationConverter:
def _process_fcurve(self, fcurve, convert=None) -> Tuple[Sequence, AbstractSet]:
"""Like _process_keyframes, but for one fcurve"""
self._exporter().report.msg("_process_fcurve")
# Adapt from incoming single item sequence to a single argument.
single_convert = lambda x: convert(x[0]) if convert is not None else None
if convert is not None:
single_convert = lambda x: convert(x[0])
else:
single_convert = None
# Can't proxy to _process_fcurves because it only supports linear interoplation.
return self._process_keyframes([fcurve], 1, [0.0], single_convert)

1
korman/exporter/material.py

@ -534,7 +534,6 @@ class MaterialConverter:
ctrl = converter(bo, bm, tex_slot, base_layer, fcurves)
if ctrl is not None:
if layer_animation is None:
name = "{}_LayerAnim".format(base_layer.key.name)
layer_animation = self.get_texture_animation_key(bo, bm, texture).object
setattr(layer_animation, attr, ctrl)

Loading…
Cancel
Save