From 3b7ddcb3bf874b54c5afe11c09086c9341ff8b09 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 8 Jul 2024 02:32:29 -0700 Subject: [PATCH 1/2] Support PythonFileMod GUI dialog procs Co-authored-by: Adam Johnson --- korman/exporter/manager.py | 2 +- korman/nodes/node_python.py | 8 ++++---- korman/properties/modifiers/logic.py | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/korman/exporter/manager.py b/korman/exporter/manager.py index 1682fab..540efdd 100644 --- a/korman/exporter/manager.py +++ b/korman/exporter/manager.py @@ -256,7 +256,7 @@ class ExportManager: key = self._keys.get((location, pClass, name), None) if key is not None and so is not None: # Purposefully not checking for plObjInterface -- they should never be shared. - if issubclass(pClass, plModifier): + if issubclass(pClass, plModifier) and plFactory.ClassIndex(pClass.__name__) not in _pool_types: if key not in so.modifiers: # We really shouldn't add plSingleModifiers to multiple objects. This may # potentially cause URU to crash. I'm uncertain though, so we'll just warn diff --git a/korman/nodes/node_python.py b/korman/nodes/node_python.py index 432a02a..75aa519 100644 --- a/korman/nodes/node_python.py +++ b/korman/nodes/node_python.py @@ -751,10 +751,10 @@ class PlasmaAttribObjectNode(idprops.IDPropObjectMixin, PlasmaAttribNodeBase, bp layout.prop(self, "target_object", text=self.attribute_name) def get_key(self, exporter, so): - attrib = self.to_socket - if attrib is None: + attrib_socket = self.to_socket + if attrib_socket is None: self.raise_error("must be connected to a Python File node!") - attrib = attrib.attribute_type + attrib = attrib_socket.attribute_type bo = self.target_object if bo is None: @@ -788,7 +788,7 @@ class PlasmaAttribObjectNode(idprops.IDPropObjectMixin, PlasmaAttribNodeBase, bp if not gui_dialog.enabled: self.raise_error(f"GUI Dialog modifier not enabled on '{self.object_name}'") dialog_mod = exporter.mgr.find_create_object(pfGUIDialogMod, so=ref_so, bl=bo) - dialog_mod.procReceiver = attrib.node.get_key(exporter, so) + dialog_mod.procReceiver = attrib_socket.node.get_key(exporter, so) return dialog_mod.key @classmethod diff --git a/korman/properties/modifiers/logic.py b/korman/properties/modifiers/logic.py index 86e39b3..4719c73 100644 --- a/korman/properties/modifiers/logic.py +++ b/korman/properties/modifiers/logic.py @@ -57,6 +57,7 @@ class PlasmaVersionedNodeTree(idprops.IDPropMixin, bpy.types.PropertyGroup): class PlasmaAdvancedLogic(PlasmaModifierProperties): pl_id = "advanced_logic" + pl_page_types = {"gui", "room"} bl_category = "Logic" bl_label = "Advanced" From 3c9e493b139e3f409eb249befd2597105bbc67d7 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 8 Jul 2024 02:33:06 -0700 Subject: [PATCH 2/2] Normal ATCAnims need not be pool objects --- korman/exporter/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/korman/exporter/manager.py b/korman/exporter/manager.py index 540efdd..d6735d0 100644 --- a/korman/exporter/manager.py +++ b/korman/exporter/manager.py @@ -36,7 +36,7 @@ _pool_types = ( plFactory.ClassIndex("plDynaRippleMgr"), plFactory.ClassIndex("plDynaBulletMgr"), plFactory.ClassIndex("plDynaPuddleMgr"), - plFactory.ClassIndex("plATCAnim"), + #plFactory.ClassIndex("plATCAnim"), # Only Avatar Animations need to be pool objects plFactory.ClassIndex("plEmoteAnim"), plFactory.ClassIndex("plDynaRippleVSMgr"), plFactory.ClassIndex("plDynaTorpedoMgr"),