mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Prevent linking non-existant or non-ifc file (#1604)
This commit is contained in:
@@ -153,7 +153,8 @@ class SelectIfcFile(bpy.types.Operator):
|
|||||||
filter_glob: bpy.props.StringProperty(default="*.ifc;*.ifczip;*.ifcxml", options={"HIDDEN"})
|
filter_glob: bpy.props.StringProperty(default="*.ifc;*.ifczip;*.ifcxml", options={"HIDDEN"})
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
bpy.context.scene.BIMProperties.ifc_file = self.filepath
|
if os.path.exists(self.filepath) and "ifc" in os.path.splitext(self.filepath)[1]:
|
||||||
|
bpy.context.scene.BIMProperties.ifc_file = self.filepath
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
|
|||||||
Reference in New Issue
Block a user