Compare commits

...

3 Commits

Author SHA1 Message Date
Adam Johnson 5fcbb99244
Merge pull request #416 from dpogue/gui-fixes 5 months ago
Darryl Pogue 3c9e493b13
Normal ATCAnims need not be pool objects 5 months ago
Darryl Pogue 3b7ddcb3bf
Support PythonFileMod GUI dialog procs 5 months ago
  1. 4
      korman/exporter/manager.py
  2. 8
      korman/nodes/node_python.py
  3. 1
      korman/properties/modifiers/logic.py

4
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"),
@ -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

8
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

1
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"

Loading…
Cancel
Save