Fix #1318 - unable to install add-on due to clash with Blender-OSM.

This commit is contained in:
Dion Moult
2021-02-18 17:44:42 +11:00
parent 67666ed70e
commit a0f79cc0db
@@ -3,9 +3,14 @@ import bpy
import tempfile import tempfile
import webbrowser import webbrowser
import ifcopenshell import ifcopenshell
import bimtester
import bimtester.run try:
import bimtester.reports import bimtester
import bimtester.run
import bimtester.reports
except:
print("Failed to load BIMTester. Try disabling other add-ons, in particular Blender-OSM. See bug #1318.")
from pathlib import Path from pathlib import Path
from itertools import cycle from itertools import cycle
from blenderbim.bim.ifc import IfcStore from blenderbim.bim.ifc import IfcStore
@@ -31,7 +36,7 @@ class ExecuteBIMTester(bpy.types.Operator):
"schema_file": "", "schema_file": "",
"schema_name": "", "schema_name": "",
"lang": "en", "lang": "en",
"steps": props.steps "steps": props.steps,
} }
use_stored_ifc = props.should_load_from_memory and IfcStore.get_file() use_stored_ifc = props.should_load_from_memory and IfcStore.get_file()
runner = bimtester.run.TestRunner(args["ifc"], ifc=IfcStore.get_file() if use_stored_ifc else None) runner = bimtester.run.TestRunner(args["ifc"], ifc=IfcStore.get_file() if use_stored_ifc else None)