Browse Source

Fix issue with group masters not being exposed to PythonFileMods.

The Python File Nodes were always picking up the group owner's
`plAGMasterMod` key instead of the group's `plMsgForwarder` key. This is
fixed by using the appropriate generic method for fetching an
animation's key.
pull/374/head
Adam Johnson 1 year ago
parent
commit
6a95720093
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 8
      korman/nodes/node_python.py

8
korman/nodes/node_python.py

@ -76,7 +76,8 @@ _attrib_key_types = {
"ptAttribDynamicMap": plFactory.ClassIndex("plDynamicTextMap"), "ptAttribDynamicMap": plFactory.ClassIndex("plDynamicTextMap"),
"ptAttribGUIDialog": plFactory.ClassIndex("pfGUIDialogMod"), "ptAttribGUIDialog": plFactory.ClassIndex("pfGUIDialogMod"),
"ptAttribExcludeRegion": plFactory.ClassIndex("plExcludeRegionMod"), "ptAttribExcludeRegion": plFactory.ClassIndex("plExcludeRegionMod"),
"ptAttribAnimation": plFactory.ClassIndex("plAGMasterMod"), "ptAttribAnimation": (plFactory.ClassIndex("plAGMasterMod"),
plFactory.ClassIndex("plMsgForwarder")),
"ptAttribBehavior": plFactory.ClassIndex("plMultistageBehMod"), "ptAttribBehavior": plFactory.ClassIndex("plMultistageBehMod"),
"ptAttribMaterial": plFactory.ClassIndex("plLayer"), "ptAttribMaterial": plFactory.ClassIndex("plLayer"),
"ptAttribMaterialList": plFactory.ClassIndex("plLayer"), "ptAttribMaterialList": plFactory.ClassIndex("plLayer"),
@ -763,10 +764,7 @@ class PlasmaAttribObjectNode(idprops.IDPropObjectMixin, PlasmaAttribNodeBase, bp
if attrib in {"ptAttribSceneobject", "ptAttribSceneobjectList"}: if attrib in {"ptAttribSceneobject", "ptAttribSceneobjectList"}:
return ref_so_key return ref_so_key
elif attrib == "ptAttribAnimation": elif attrib == "ptAttribAnimation":
anim = bo.plasma_modifiers.animation return exporter.animation.get_animation_key(bo, ref_so)
agmod = exporter.mgr.find_create_key(plAGModifier, so=ref_so, name=anim.key_name)
agmaster = exporter.mgr.find_create_key(plAGMasterMod, so=ref_so, name=anim.key_name)
return agmaster
elif attrib == "ptAttribSwimCurrent": elif attrib == "ptAttribSwimCurrent":
swimregion = bo.plasma_modifiers.swimregion swimregion = bo.plasma_modifiers.swimregion
return swimregion.get_key(exporter, ref_so) return swimregion.get_key(exporter, ref_so)

Loading…
Cancel
Save