Skip to content

Commit

Permalink
Merge pull request #416 from dpogue/gui-fixes
Browse files Browse the repository at this point in the history
GUIDialog Python Proc fixes
  • Loading branch information
Hoikas authored Jul 8, 2024
2 parents 9244d3a + 3c9e493 commit 5fcbb99
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions korman/exporter/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
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"),
Expand Down Expand Up @@ -256,7 +256,7 @@ def find_key(self, pClass: Type[KeyedT], bl=None, name=None, so=None, loc=None)
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
Expand Down
8 changes: 4 additions & 4 deletions korman/nodes/node_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,10 @@ def draw_buttons(self, context, layout):
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:
Expand Down Expand Up @@ -788,7 +788,7 @@ def get_key(self, exporter, so):
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
Expand Down
1 change: 1 addition & 0 deletions korman/properties/modifiers/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def _idprop_sources(self):

class PlasmaAdvancedLogic(PlasmaModifierProperties):
pl_id = "advanced_logic"
pl_page_types = {"gui", "room"}

bl_category = "Logic"
bl_label = "Advanced"
Expand Down

0 comments on commit 5fcbb99

Please sign in to comment.