diff --git a/korman/nodes/node_python.py b/korman/nodes/node_python.py index f92449d..c0ca09d 100644 --- a/korman/nodes/node_python.py +++ b/korman/nodes/node_python.py @@ -19,6 +19,7 @@ from contextlib import contextmanager from pathlib import Path from PyHSPlasma import * +from ..korlib import replace_python2_identifier from .node_core import * from .node_deprecated import PlasmaVersionedNode from .. import idprops @@ -305,6 +306,12 @@ class PlasmaPythonFileNode(PlasmaVersionedNode, bpy.types.Node): if i.attribute_id == idx: yield i + @property + def key_name(self): + # PFM names ***must*** be valid Python identifiers, but Blender likes inserting + # periods into the object names "Foo.001" -- this causes bad internal chaos in PotS + return replace_python2_identifier("{}_{}".format(self.id_data.name, self.name)) + def _make_attrib_socket(self, attrib, is_init=False): new_pos = len(self.inputs) if not is_init: