Fix error due to trying to patch non-existent file

This commit is contained in:
Gorgious
2021-08-03 20:30:30 +02:00
parent ecfe8c3799
commit 67740a5f79
@@ -40,6 +40,11 @@ class ExecuteIfcPatch(bpy.types.Operator):
bl_label = "Execute IFCPatch"
file_format: bpy.props.StringProperty()
@classmethod
def poll(cls, context):
input_file = context.scene.BIMPatchProperties.ifc_patch_input
return os.path.isfile(input_file) and "ifc" in os.path.splitext(input_file)[1]
def execute(self, context):
import ifcpatch