Skip to content

Commit 5fcbb99

Browse files
authored
Merge pull request #416 from dpogue/gui-fixes
GUIDialog Python Proc fixes
2 parents 9244d3a + 3c9e493 commit 5fcbb99

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

korman/exporter/manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
plFactory.ClassIndex("plDynaRippleMgr"),
3737
plFactory.ClassIndex("plDynaBulletMgr"),
3838
plFactory.ClassIndex("plDynaPuddleMgr"),
39-
plFactory.ClassIndex("plATCAnim"),
39+
#plFactory.ClassIndex("plATCAnim"), # Only Avatar Animations need to be pool objects
4040
plFactory.ClassIndex("plEmoteAnim"),
4141
plFactory.ClassIndex("plDynaRippleVSMgr"),
4242
plFactory.ClassIndex("plDynaTorpedoMgr"),
@@ -256,7 +256,7 @@ def find_key(self, pClass: Type[KeyedT], bl=None, name=None, so=None, loc=None)
256256
key = self._keys.get((location, pClass, name), None)
257257
if key is not None and so is not None:
258258
# Purposefully not checking for plObjInterface -- they should never be shared.
259-
if issubclass(pClass, plModifier):
259+
if issubclass(pClass, plModifier) and plFactory.ClassIndex(pClass.__name__) not in _pool_types:
260260
if key not in so.modifiers:
261261
# We really shouldn't add plSingleModifiers to multiple objects. This may
262262
# potentially cause URU to crash. I'm uncertain though, so we'll just warn

korman/nodes/node_python.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,10 +751,10 @@ def draw_buttons(self, context, layout):
751751
layout.prop(self, "target_object", text=self.attribute_name)
752752

753753
def get_key(self, exporter, so):
754-
attrib = self.to_socket
755-
if attrib is None:
754+
attrib_socket = self.to_socket
755+
if attrib_socket is None:
756756
self.raise_error("must be connected to a Python File node!")
757-
attrib = attrib.attribute_type
757+
attrib = attrib_socket.attribute_type
758758

759759
bo = self.target_object
760760
if bo is None:
@@ -788,7 +788,7 @@ def get_key(self, exporter, so):
788788
if not gui_dialog.enabled:
789789
self.raise_error(f"GUI Dialog modifier not enabled on '{self.object_name}'")
790790
dialog_mod = exporter.mgr.find_create_object(pfGUIDialogMod, so=ref_so, bl=bo)
791-
dialog_mod.procReceiver = attrib.node.get_key(exporter, so)
791+
dialog_mod.procReceiver = attrib_socket.node.get_key(exporter, so)
792792
return dialog_mod.key
793793

794794
@classmethod

korman/properties/modifiers/logic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def _idprop_sources(self):
5757

5858
class PlasmaAdvancedLogic(PlasmaModifierProperties):
5959
pl_id = "advanced_logic"
60+
pl_page_types = {"gui", "room"}
6061

6162
bl_category = "Logic"
6263
bl_label = "Advanced"

0 commit comments

Comments
 (0)