From 2ad3774917e6b9fea18241b709d504f2ad77ab7b Mon Sep 17 00:00:00 2001 From: Jrius <2261279+Jrius@users.noreply.github.com> Date: Fri, 23 Apr 2021 17:38:08 +0200 Subject: [PATCH] Allow GroupMaster (MsgForwarder) to animate object data (such as lamps) --- korman/idprops.py | 3 +++ korman/properties/modifiers/anim.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/korman/idprops.py b/korman/idprops.py index b7c55a6..f351cb0 100644 --- a/korman/idprops.py +++ b/korman/idprops.py @@ -122,6 +122,9 @@ def poll_animated_objects(self, value): if value.animation_data is not None: if value.animation_data.action is not None: return True + if value.data is not None and value.data.animation_data is not None: + if value.data.animation_data.action is not None: + return True return False def poll_camera_objects(self, value): diff --git a/korman/properties/modifiers/anim.py b/korman/properties/modifiers/anim.py index c836df4..05e8f5d 100644 --- a/korman/properties/modifiers/anim.py +++ b/korman/properties/modifiers/anim.py @@ -193,7 +193,11 @@ class PlasmaAnimationGroupModifier(ActionModifier, PlasmaModifierProperties): msg = "Animation Group '{}' specifies an invalid object. Ignoring..." exporter.report.warn(msg, self.key_name, ident=2) continue - if child_bo.animation_data is None or child_bo.animation_data.action is None: + animation_data = child_bo.animation_data + if animation_data is None or animation_data.action is None: + if child_bo.data is not None: + animation_data = child_bo.data.animation_data + if animation_data is None or animation_data.action is None: msg = "Animation Group '{}' specifies an object '{}' with no valid animation data. Ignoring..." exporter.report.warn(msg, self.key_name, child_bo.name, indent=2) continue