Browse Source

Fix NULL LayerAnimation base layer crash

Ok, so, the exporter incorrectly assumed it created all plLayerAnimations.
In reality, nodes could create the plLayerAnimation first. If the material
exporter recreates the object, bad things happen, and an invalid
plLayerAnimation is added to the hsGMaterial. UruExplorer then goes
KABLOOEY!!!
pull/35/head
Adam Johnson 9 years ago
parent
commit
5289bf0735
  1. 2
      korman/exporter/material.py

2
korman/exporter/material.py

@ -244,7 +244,7 @@ class MaterialConverter:
if ctrl is not None:
if layer_animation is None:
name = "{}_LayerAnim".format(base_layer.key.name)
layer_animation = self._mgr.add_object(plLayerAnimation, bl=bo, name=name)
layer_animation = self._mgr.find_create_object(plLayerAnimation, bl=bo, name=name)
setattr(layer_animation, attr, ctrl)
# Alrighty, if we exported any controllers, layer_animation is a plLayerAnimation. We need to do

Loading…
Cancel
Save