Browse Source

Fix issue with python files on dead HDDs

pull/123/head
Adam Johnson 6 years ago
parent
commit
15a16500e5
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 11
      korman/nodes/node_python.py

11
korman/nodes/node_python.py

@ -202,10 +202,13 @@ class PlasmaPythonFileNode(PlasmaNodeBase, bpy.types.Node):
row = layout.row(align=True)
if self.filename:
row.prop(self, "filename")
if Path(self.filepath).exists():
operator = row.operator("node.plasma_attributes_to_node", icon="FILE_REFRESH", text="")
operator.python_path = self.filepath
operator.node_path = self.node_path
try:
if Path(self.filepath).exists():
operator = row.operator("node.plasma_attributes_to_node", icon="FILE_REFRESH", text="")
operator.python_path = self.filepath
operator.node_path = self.node_path
except OSError:
pass
op_text = "" if self.filename else "Select"
operator = row.operator("file.plasma_file_picker", icon="SCRIPT", text=op_text)

Loading…
Cancel
Save