mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-31 00:46:36 +00:00
Fix #4921. When upgrading to IFC4X3, preprocess the file to remove deprecated style assignments
This commit is contained in:
@@ -48,6 +48,8 @@ class GeoreferenceData:
|
||||
|
||||
@classmethod
|
||||
def coordinate_operation_class(cls):
|
||||
if tool.Ifc.get_schema() == "IFC2X3":
|
||||
return []
|
||||
declaration = tool.Ifc.schema().declaration_by_name("IfcCoordinateOperation")
|
||||
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
||||
names = [d.name() for d in declarations]
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import bpy
|
||||
import ifcopenshell
|
||||
import blenderbim.core.tool
|
||||
import blenderbim.tool as tool
|
||||
|
||||
try:
|
||||
import ifcpatch
|
||||
@@ -31,6 +29,5 @@ except:
|
||||
class Patch(blenderbim.core.tool.Patch):
|
||||
@classmethod
|
||||
def run_migrate_patch(cls, infile, outfile, schema):
|
||||
log = os.path.join(bpy.context.scene.BIMProperties.data_dir, "process.log")
|
||||
output = ifcpatch.execute({"input": infile, "file": ifcopenshell.open(infile), "recipe": "Migrate", "arguments": [schema]})
|
||||
ifcpatch.write(output, outfile)
|
||||
|
||||
Reference in New Issue
Block a user