diff --git a/korman/nodes/node_core.py b/korman/nodes/node_core.py index ff3e4f3..5491a29 100644 --- a/korman/nodes/node_core.py +++ b/korman/nodes/node_core.py @@ -20,6 +20,7 @@ from PyHSPlasma import * import time from ..exporter import ExportError +from ..korlib import replace_python2_identifier class PlasmaNodeBase: def generate_notify_msg(self, exporter, so, socket_id, idname=None): @@ -44,14 +45,15 @@ class PlasmaNodeBase: if single: name = bl.name if bl is not None else so.key.name if suffix: - return "{}_{}_{}_{}".format(name, self.id_data.name, self.name, suffix) + working_name = "{}_{}_{}_{}".format(name, self.id_data.name, self.name, suffix) else: - return "{}_{}_{}".format(name, self.id_data.name, self.name) + working_name = "{}_{}_{}".format(name, self.id_data.name, self.name) else: if suffix: - return "{}_{}_{}".format(self.id_data.name, self.name, suffix) + working_name = "{}_{}_{}".format(self.id_data.name, self.name, suffix) else: - return "{}_{}".format(self.id_data.name, self.name) + working_name = "{}_{}".format(self.id_data.name, self.name) + return replace_python2_identifier(working_name) def draw_label(self): if hasattr(self, "pl_label_attr") and self.hide: diff --git a/korman/nodes/node_python.py b/korman/nodes/node_python.py index f9a841b..9ad7949 100644 --- a/korman/nodes/node_python.py +++ b/korman/nodes/node_python.py @@ -19,7 +19,6 @@ 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 PlasmaDeprecatedNode, PlasmaVersionedNode from .. import idprops @@ -400,12 +399,6 @@ class PlasmaPythonFileNode(PlasmaVersionedNode, bpy.types.Node): if node.target_object is not None: yield node.target_object.name - @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: