Browse Source

Fix Rail Camera keyframe issue

Keeps Korman from exporting a rail camera with only one keyframe (or duplicate location keyframes), which causes the client to crash.
pull/200/head
Patrick Dulebohn 4 years ago committed by Patrick Dulebohn
parent
commit
3cdc2c8e94
  1. 3
      korman/exporter/camera.py

3
korman/exporter/camera.py

@ -206,6 +206,9 @@ class CameraConverter:
f1, f2 = fcurve.evaluate(begin), fcurve.evaluate(end)
if abs(f1 - f2) > 0.001:
break
# to avoid single/duplicate keyframe client crash (per Hoikas)
if any((len(i.keys) == 1 for i in (pos_ctrl.X, pos_ctrl.Y, pos_ctrl.Z) if i is not None)):
raise ExportError("'{}': Rail Camera must have more than one keyframe", bo.name)
else:
# The animation is a loop
path.flags |= plAnimPath.kWrap

Loading…
Cancel
Save