mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
remove try except for ifcpatch import as it's not optional
This commit is contained in:
@@ -20,16 +20,12 @@ import os
|
|||||||
import bpy
|
import bpy
|
||||||
import json
|
import json
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
|
import ifcpatch
|
||||||
import bonsai.tool as tool
|
import bonsai.tool as tool
|
||||||
import bonsai.core.patch as core
|
import bonsai.core.patch as core
|
||||||
import bonsai.bim.handler
|
import bonsai.bim.handler
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
try:
|
|
||||||
import ifcpatch
|
|
||||||
except:
|
|
||||||
print("IfcPatch not available")
|
|
||||||
|
|
||||||
|
|
||||||
class SelectIfcPatchInput(bpy.types.Operator):
|
class SelectIfcPatchInput(bpy.types.Operator):
|
||||||
bl_idname = "bim.select_ifc_patch_input"
|
bl_idname = "bim.select_ifc_patch_input"
|
||||||
|
|||||||
@@ -18,17 +18,8 @@
|
|||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
|
import ifcpatch
|
||||||
import bonsai.core.tool
|
import bonsai.core.tool
|
||||||
from typing import TYPE_CHECKING
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
import ifcpatch
|
|
||||||
except ImportError:
|
|
||||||
print("IfcPatch not available")
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
import ifcpatch
|
|
||||||
|
|
||||||
|
|
||||||
class Patch(bonsai.core.tool.Patch):
|
class Patch(bonsai.core.tool.Patch):
|
||||||
|
|||||||
Reference in New Issue
Block a user