Repackage BlenderBIM Add-on in single add-on dir thanks to Stephen Leger from Archipack
@@ -23,26 +23,23 @@ endif
|
||||
rm -rf dist
|
||||
mkdir -p dist/working
|
||||
mkdir -p dist/blenderbim
|
||||
ifneq ($(PLATFORM), win)
|
||||
mkdir -p dist/lib
|
||||
endif
|
||||
cp -r blenderbim/* dist/blenderbim/
|
||||
|
||||
cd dist/working && wget https://s3.amazonaws.com/ifcopenshell-builds/ifcblender-python-37-v0.6.0-e44221c-$(PLATFORM)64.zip
|
||||
cd dist/working && unzip ifcblender*
|
||||
cp -r dist/working/io_import_scene_ifc/ifcopenshell dist/
|
||||
cp -r dist/working/io_import_scene_ifc/ifcopenshell dist/blenderbim/scripts/addons/
|
||||
# See bug #812
|
||||
cd dist/working && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcblenderexport/occ_utils.py
|
||||
cd dist/working && mv occ_utils.py ../ifcopenshell/geom/occ_utils.py
|
||||
cd dist/working && mv occ_utils.py ../blenderbim/scripts/addons/ifcopenshell/geom/occ_utils.py
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget $(PYTHONOCC_URL)
|
||||
cd dist/working && tar -xjvf pythonocc-core*
|
||||
ifeq ($(PLATFORM), win)
|
||||
cd dist/working && cp -r Lib/site-packages/OCC ../
|
||||
cd dist/working && cp -r Lib/site-packages/OCC ../blenderbim/scripts/addons/
|
||||
else
|
||||
cd dist/working && cp -r lib/python3.7/site-packages/OCC ../
|
||||
cd dist/working && cp -r lib/python3.7/site-packages/OCC ../blenderbim/scripts/addons/
|
||||
endif
|
||||
rm -rf dist/working
|
||||
|
||||
@@ -50,9 +47,10 @@ endif
|
||||
cd dist/working && wget $(OCE_URL)
|
||||
cd dist/working && tar -xjvf oce*
|
||||
ifeq ($(PLATFORM), win)
|
||||
cd dist/working && cp -r Library/bin/* ../OCC/
|
||||
cd dist/working && cp -r Library/bin/* ../blenderbim/scripts/addons/OCC/
|
||||
else
|
||||
cd dist/working && cp -r lib/* ../lib/
|
||||
# Unix Conda builds of PythonOCC expect OCE libs to have a RPATH of ../../../
|
||||
cd dist/working && cp -r lib/* ../blenderbim/
|
||||
endif
|
||||
rm -rf dist/working
|
||||
|
||||
@@ -60,9 +58,9 @@ endif
|
||||
cd dist/working && wget $(TBB_URL)
|
||||
cd dist/working && tar -xjvf tbb*
|
||||
ifeq ($(PLATFORM), win)
|
||||
cd dist/working && cp -r Library/bin/* ../OCC/
|
||||
cd dist/working && cp -r Library/bin/* ../blenderbim/scripts/addons/OCC/
|
||||
else
|
||||
cd dist/working && cp -r lib/* ../lib/
|
||||
cd dist/working && cp -r lib/* ../blenderbim/
|
||||
endif
|
||||
rm -rf dist/working
|
||||
|
||||
@@ -70,80 +68,80 @@ ifeq ($(PLATFORM), macos)
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://blenderbim.org/builds/patch-blender28-bim-macos.zip
|
||||
cd dist/working && unzip patch*
|
||||
cd dist/working && cp -r *.dylib ../lib/
|
||||
cd dist/working && cp -r *.dylib ../blenderbim/
|
||||
rm -rf dist/working
|
||||
endif
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/d6/fd/eb8c212053addd941cc90baac307c00ac246ac3fce7166b86434c6eae963/pystache-0.5.4.tar.gz
|
||||
cd dist/working && tar -xzvf pystache*
|
||||
cd dist/working/pystache-0.5.4/ && python setup.py build && cp -r build/lib/pystache ../../
|
||||
cd dist/working/pystache-0.5.4/ && python setup.py build && cp -r build/lib/pystache ../../blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/79/e8/7eb2ba188eda14a4b47e33b51f3b4978985f4116655c699bcd18c79279b5/svgwrite-1.3.1.zip
|
||||
cd dist/working && unzip svgwrite*
|
||||
cp -r dist/working/svgwrite-1.3.1/svgwrite dist/
|
||||
cp -r dist/working/svgwrite-1.3.1/svgwrite dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://github.com/Moult/deepdiff/archive/master.zip
|
||||
cd dist/working && unzip master.zip
|
||||
cp -r dist/working/deepdiff-master/deepdiff dist/
|
||||
cp -r dist/working/deepdiff-master/deepdiff dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/00/55/ce2cbc6d64034b30cad81a29ba61bdba456f190f5e83c09831304bf68d6b/jsonpickle-1.2.tar.gz
|
||||
cd dist/working && tar -xzvf jsonpickle*
|
||||
cp -r dist/working/jsonpickle-1.2/jsonpickle dist/
|
||||
cp -r dist/working/jsonpickle-1.2/jsonpickle dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/a3/b7/d4d69641cbe707a45c23b190f2d717466ba5accc4c70b5f7a8a450387895/ordered-set-3.1.1.tar.gz
|
||||
cd dist/working && tar -xzvf ordered-set*
|
||||
cp -r dist/working/ordered-set-3.1.1/ordered_set.py dist/
|
||||
cp -r dist/working/ordered-set-3.1.1/ordered_set.py dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/00/32/8076fa13e832bb4dcff379f18f228e5a53412be0631808b9ca2610c0f566/pyparsing-2.4.5.tar.gz
|
||||
cd dist/working && tar -xzvf pyparsing*
|
||||
cp -r dist/working/pyparsing-2.4.5/pyparsing.py dist/
|
||||
cp -r dist/working/pyparsing-2.4.5/pyparsing.py dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/82/c3/534ddba230bd4fbbd3b7a3d35f3341d014cca213f369a9940925e7e5f691/pytz-2019.3.tar.gz
|
||||
cd dist/working && tar -xzvf pytz*
|
||||
cp -r dist/working/pytz-2019.3/pytz dist/
|
||||
cp -r dist/working/pytz-2019.3/pytz dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz
|
||||
cd dist/working && tar -xzvf python-dateutil*
|
||||
cp -r dist/working/python-dateutil-2.8.1/dateutil dist/
|
||||
cp -r dist/working/python-dateutil-2.8.1/dateutil dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz
|
||||
cd dist/working && tar -xzvf six*
|
||||
cp -r dist/working/six-1.14.0/six.py dist/
|
||||
cp -r dist/working/six-1.14.0/six.py dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/bb/41/ad9ce53bb978b68af8ae415293cafc89b165b8ad55a593725299dca76729/xmlschema-1.1.1.tar.gz
|
||||
cd dist/working && tar -xzvf xmlschema*
|
||||
cp -r dist/working/xmlschema-1.1.1/xmlschema dist/
|
||||
cp -r dist/working/xmlschema-1.1.1/xmlschema dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://files.pythonhosted.org/packages/12/f9/f9960222d5274944b01391749e55e4dcdf28d8f0c108b64ac931ceff6fdb/elementpath-1.4.3.tar.gz
|
||||
cd dist/working && tar -xzvf elementpath*
|
||||
cp -r dist/working/elementpath-1.4.3/elementpath dist/
|
||||
cp -r dist/working/elementpath-1.4.3/elementpath dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
cd dist/working && wget https://github.com/Moult/BCF-Plugin-FreeCAD/archive/fix-headless.zip
|
||||
cd dist/working && unzip fix-headless*
|
||||
cp -r dist/working/BCF-Plugin-FreeCAD-fix-headless/bcfplugin dist/
|
||||
cp -r dist/working/BCF-Plugin-FreeCAD-fix-headless/bcfplugin dist/blenderbim/scripts/addons/
|
||||
rm -rf dist/working
|
||||
|
||||
mkdir dist/working
|
||||
@@ -152,33 +150,15 @@ endif
|
||||
cd dist/working && wget https://raw.githubusercontent.com/buildingSMART/BCF-XML/release_2_1/Schemas/markup.xsd
|
||||
cd dist/working && wget https://raw.githubusercontent.com/buildingSMART/BCF-XML/release_2_1/Schemas/version.xsd
|
||||
cd dist/working && wget https://raw.githubusercontent.com/buildingSMART/BCF-XML/release_2_1/Schemas/visinfo.xsd
|
||||
mkdir dist/bcfplugin/schemas/
|
||||
cp -r dist/working/*.xsd dist/bcfplugin/schemas/
|
||||
mkdir dist/blenderbim/scripts/addons/bcfplugin/schemas/
|
||||
cp -r dist/working/*.xsd dist/blenderbim/scripts/addons/bcfplugin/schemas/
|
||||
rm -rf dist/working
|
||||
|
||||
cd dist/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcdiff/ifcdiff.py
|
||||
cd dist/blenderbim/scripts/addons/ && wget https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.6.0/src/ifcdiff/ifcdiff.py
|
||||
|
||||
cd dist/blenderbim && sed -i "s/999999/$(VERSION)/" __init__.py
|
||||
cd dist && zip -r blender28-bim-$(VERSION)-$(PLATFORM).zip ./*
|
||||
rm -rf dist/blenderbim
|
||||
rm -rf dist/ifcopenshell
|
||||
rm -rf dist/OCC
|
||||
rm -rf dist/pystache
|
||||
rm -rf dist/svgwrite
|
||||
rm -rf dist/deepdiff
|
||||
rm -rf dist/jsonpickle
|
||||
rm -rf dist/ordered_set.py
|
||||
rm -rf dist/pyparsing.py
|
||||
rm -rf dist/bcfplugin
|
||||
rm -rf dist/dateutil
|
||||
rm -rf dist/elementpath
|
||||
rm -rf dist/pytz
|
||||
rm -rf dist/six.py
|
||||
rm -rf dist/xmlschema
|
||||
rm -rf dist/ifcdiff.py
|
||||
ifneq ($(PLATFORM), win)
|
||||
rm -rf dist/lib
|
||||
endif
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||
@@ -10,203 +10,23 @@ bl_info = {
|
||||
"category": "Import-Export"
|
||||
}
|
||||
|
||||
# Check if we are running in Blender before loading, to allow for multiprocessing
|
||||
import sys
|
||||
import os
|
||||
bpy = sys.modules.get('bpy')
|
||||
import site
|
||||
|
||||
if bpy is not None:
|
||||
cwd = os.path.dirname(os.path.realpath(__file__))
|
||||
# This workaround is for Mac and Linux Conda builds, which have an rpath set
|
||||
# to $ORIGIN/../../../
|
||||
lib_dir = os.path.join(cwd, '..', 'lib')
|
||||
if os.path.isdir(lib_dir):
|
||||
import shutil
|
||||
files = os.listdir(lib_dir)
|
||||
for f in files:
|
||||
shutil.move(os.path.join(lib_dir, f), os.path.join(lib_dir, '..', '..', '..'))
|
||||
# process ifcopenshell.pth in /scripts/addons
|
||||
site.addsitedir(os.path.join(os.path.dirname(os.path.realpath(__file__)), "scripts", "addons"))
|
||||
|
||||
import bpy
|
||||
from . import ui, prop, operator
|
||||
import bim as blenderbim
|
||||
import ifcopenshell
|
||||
|
||||
classes = (
|
||||
operator.AssignClass,
|
||||
operator.SelectClass,
|
||||
operator.SelectType,
|
||||
operator.SelectBcfFile,
|
||||
operator.GetBcfTopics,
|
||||
operator.ViewBcfTopic,
|
||||
operator.ActivateBcfViewpoint,
|
||||
operator.OpenBcfFileReference,
|
||||
operator.OpenBcfReferenceLink,
|
||||
operator.OpenBcfBimSnippetSchema,
|
||||
operator.OpenBcfBimSnippetReference,
|
||||
operator.OpenBcfDocumentReference,
|
||||
operator.SelectFeaturesDir,
|
||||
operator.SelectDiffJsonFile,
|
||||
operator.SelectDiffNewFile,
|
||||
operator.SelectDiffOldFile,
|
||||
operator.SelectDataDir,
|
||||
operator.SelectSchemaDir,
|
||||
operator.SelectIfcFile,
|
||||
operator.ValidateIfcFile,
|
||||
operator.ExportIFC,
|
||||
operator.ImportIFC,
|
||||
operator.ColourByClass,
|
||||
operator.ColourByAttribute,
|
||||
operator.ColourByPset,
|
||||
operator.ResetObjectColours,
|
||||
operator.ApproveClass,
|
||||
operator.RejectClass,
|
||||
operator.SelectAudited,
|
||||
operator.RejectElement,
|
||||
operator.SelectExternalMaterialDir,
|
||||
operator.AddSweptSolid,
|
||||
operator.RemoveSweptSolid,
|
||||
operator.AssignSweptSolidOuterCurve,
|
||||
operator.SelectSweptSolidOuterCurve,
|
||||
operator.AddSweptSolidInnerCurve,
|
||||
operator.SelectSweptSolidInnerCurves,
|
||||
operator.AssignSweptSolidExtrusion,
|
||||
operator.SelectSweptSolidExtrusion,
|
||||
operator.AssignPset,
|
||||
operator.UnassignPset,
|
||||
operator.AddPset,
|
||||
operator.RemovePset,
|
||||
operator.AddOverridePset,
|
||||
operator.RemoveOverridePset,
|
||||
operator.AddQto,
|
||||
operator.RemoveQto,
|
||||
operator.AddMaterialPset,
|
||||
operator.RemoveMaterialPset,
|
||||
operator.AddDocument,
|
||||
operator.RemoveDocument,
|
||||
operator.GenerateGlobalId,
|
||||
operator.AddAttribute,
|
||||
operator.RemoveAttribute,
|
||||
operator.AddMaterialAttribute,
|
||||
operator.RemoveMaterialAttribute,
|
||||
operator.QuickProjectSetup,
|
||||
operator.SelectGlobalId,
|
||||
operator.SelectAttribute,
|
||||
operator.SelectPset,
|
||||
operator.CreateAggregate,
|
||||
operator.EditAggregate,
|
||||
operator.SaveAggregate,
|
||||
operator.ExplodeAggregate,
|
||||
operator.AssignClassification,
|
||||
operator.UnassignClassification,
|
||||
operator.RemoveClassification,
|
||||
operator.FetchLibraryInformation,
|
||||
operator.FetchExternalMaterial,
|
||||
operator.FetchObjectPassport,
|
||||
operator.AddSubcontext,
|
||||
operator.RemoveSubcontext,
|
||||
operator.CutSection,
|
||||
operator.CreateSheet,
|
||||
operator.OpenSheet,
|
||||
operator.OpenCompiledSheet,
|
||||
operator.AddViewToSheet,
|
||||
operator.CreateSheets,
|
||||
operator.GenerateDigitalTwin,
|
||||
operator.CreateView,
|
||||
operator.OpenView,
|
||||
operator.ActivateView,
|
||||
operator.ExecuteIfcDiff,
|
||||
operator.AssignContext,
|
||||
operator.SetViewPreset1,
|
||||
operator.OpenUpstream,
|
||||
operator.Uninstall,
|
||||
prop.BcfTopic,
|
||||
prop.BcfTopicLabel,
|
||||
prop.BcfTopicFile,
|
||||
prop.BcfTopicLink,
|
||||
prop.BcfTopicDocumentReference,
|
||||
prop.BcfTopicRelatedTopic,
|
||||
prop.Subcontext,
|
||||
prop.BIMProperties,
|
||||
prop.BCFProperties,
|
||||
prop.DocProperties,
|
||||
prop.BIMLibrary,
|
||||
prop.MapConversion,
|
||||
prop.TargetCRS,
|
||||
prop.Attribute,
|
||||
prop.BoundaryCondition,
|
||||
prop.PsetQto,
|
||||
prop.Document,
|
||||
prop.Classification,
|
||||
prop.GlobalId,
|
||||
prop.BIMObjectProperties,
|
||||
prop.BIMMaterialProperties,
|
||||
prop.SweptSolid,
|
||||
prop.BIMMeshProperties,
|
||||
prop.BIMCameraProperties,
|
||||
ui.BIM_PT_documentation,
|
||||
ui.BIM_PT_bim,
|
||||
ui.BIM_PT_search,
|
||||
ui.BIM_PT_bcf,
|
||||
ui.BIM_PT_owner,
|
||||
ui.BIM_PT_context,
|
||||
ui.BIM_PT_qa,
|
||||
ui.BIM_PT_library,
|
||||
ui.BIM_PT_gis,
|
||||
ui.BIM_PT_diff,
|
||||
ui.BIM_PT_mvd,
|
||||
ui.BIM_PT_material,
|
||||
ui.BIM_PT_mesh,
|
||||
ui.BIM_PT_object,
|
||||
ui.BIM_PT_camera,
|
||||
ui.BIM_UL_topics,
|
||||
ui.BIM_ADDON_preferences,
|
||||
)
|
||||
|
||||
def menu_func_export(self, context):
|
||||
self.layout.operator(operator.ExportIFC.bl_idname,
|
||||
text="Industry Foundation Classes (.ifc)")
|
||||
def register():
|
||||
blenderbim.register()
|
||||
|
||||
def menu_func_import(self, context):
|
||||
self.layout.operator(operator.ImportIFC.bl_idname,
|
||||
text="Industry Foundation Classes (.ifc)")
|
||||
|
||||
def on_register(scene):
|
||||
prop.setDefaultProperties(scene)
|
||||
bpy.app.handlers.scene_update_post.remove(on_register)
|
||||
def unregister():
|
||||
blenderbim.unregister()
|
||||
|
||||
def register():
|
||||
for cls in classes:
|
||||
bpy.utils.register_class(cls)
|
||||
bpy.app.handlers.depsgraph_update_post.append(on_register)
|
||||
bpy.app.handlers.load_post.append(prop.setDefaultProperties)
|
||||
bpy.types.TOPBAR_MT_file_export.append(menu_func_export)
|
||||
bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
|
||||
bpy.types.Scene.BIMProperties = bpy.props.PointerProperty(type=prop.BIMProperties)
|
||||
bpy.types.Scene.BCFProperties = bpy.props.PointerProperty(type=prop.BCFProperties)
|
||||
bpy.types.Scene.DocProperties = bpy.props.PointerProperty(type=prop.DocProperties)
|
||||
bpy.types.Scene.BIMLibrary = bpy.props.PointerProperty(type=prop.BIMLibrary)
|
||||
bpy.types.Scene.MapConversion = bpy.props.PointerProperty(type=prop.MapConversion)
|
||||
bpy.types.Scene.TargetCRS = bpy.props.PointerProperty(type=prop.TargetCRS)
|
||||
bpy.types.Object.BIMObjectProperties = bpy.props.PointerProperty(type=prop.BIMObjectProperties)
|
||||
bpy.types.Collection.BIMObjectProperties = bpy.props.PointerProperty(type=prop.BIMObjectProperties)
|
||||
bpy.types.Material.BIMMaterialProperties = bpy.props.PointerProperty(type=prop.BIMMaterialProperties)
|
||||
bpy.types.Mesh.BIMMeshProperties = bpy.props.PointerProperty(type=prop.BIMMeshProperties)
|
||||
bpy.types.Camera.BIMCameraProperties = bpy.props.PointerProperty(type=prop.BIMCameraProperties)
|
||||
|
||||
def unregister():
|
||||
for cls in reversed(classes):
|
||||
bpy.utils.unregister_class(cls)
|
||||
bpy.app.handlers.load_post.remove(prop.setDefaultProperties)
|
||||
bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)
|
||||
bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
|
||||
del(bpy.types.Scene.BIMProperties)
|
||||
del(bpy.types.Scene.BCFProperties)
|
||||
del(bpy.types.Scene.DocProperties)
|
||||
del(bpy.types.Scene.MapConversion)
|
||||
del(bpy.types.Scene.TargetCRS)
|
||||
del(bpy.types.Object.BIMObjectProperties)
|
||||
del(bpy.types.Collection.BIMObjectProperties)
|
||||
del(bpy.types.Material.BIMMaterialProperties)
|
||||
del(bpy.types.Mesh.BIMMeshProperties)
|
||||
del(bpy.types.Camera.BIMCameraProperties)
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
# Check if we are running in Blender before loading, to allow for multiprocessing
|
||||
import sys
|
||||
import os
|
||||
bpy = sys.modules.get('bpy')
|
||||
|
||||
if bpy is not None:
|
||||
import bpy
|
||||
from . import ui, prop, operator
|
||||
|
||||
classes = (
|
||||
operator.AssignClass,
|
||||
operator.SelectClass,
|
||||
operator.SelectType,
|
||||
operator.SelectBcfFile,
|
||||
operator.GetBcfTopics,
|
||||
operator.ViewBcfTopic,
|
||||
operator.ActivateBcfViewpoint,
|
||||
operator.OpenBcfFileReference,
|
||||
operator.OpenBcfReferenceLink,
|
||||
operator.OpenBcfBimSnippetSchema,
|
||||
operator.OpenBcfBimSnippetReference,
|
||||
operator.OpenBcfDocumentReference,
|
||||
operator.SelectFeaturesDir,
|
||||
operator.SelectDiffJsonFile,
|
||||
operator.SelectDiffNewFile,
|
||||
operator.SelectDiffOldFile,
|
||||
operator.SelectDataDir,
|
||||
operator.SelectSchemaDir,
|
||||
operator.SelectIfcFile,
|
||||
operator.ValidateIfcFile,
|
||||
operator.ExportIFC,
|
||||
operator.ImportIFC,
|
||||
operator.ColourByClass,
|
||||
operator.ColourByAttribute,
|
||||
operator.ColourByPset,
|
||||
operator.ResetObjectColours,
|
||||
operator.ApproveClass,
|
||||
operator.RejectClass,
|
||||
operator.SelectAudited,
|
||||
operator.RejectElement,
|
||||
operator.SelectExternalMaterialDir,
|
||||
operator.AddSweptSolid,
|
||||
operator.RemoveSweptSolid,
|
||||
operator.AssignSweptSolidOuterCurve,
|
||||
operator.SelectSweptSolidOuterCurve,
|
||||
operator.AddSweptSolidInnerCurve,
|
||||
operator.SelectSweptSolidInnerCurves,
|
||||
operator.AssignSweptSolidExtrusion,
|
||||
operator.SelectSweptSolidExtrusion,
|
||||
operator.AssignPset,
|
||||
operator.UnassignPset,
|
||||
operator.AddPset,
|
||||
operator.RemovePset,
|
||||
operator.AddOverridePset,
|
||||
operator.RemoveOverridePset,
|
||||
operator.AddQto,
|
||||
operator.RemoveQto,
|
||||
operator.AddMaterialPset,
|
||||
operator.RemoveMaterialPset,
|
||||
operator.AddDocument,
|
||||
operator.RemoveDocument,
|
||||
operator.GenerateGlobalId,
|
||||
operator.AddAttribute,
|
||||
operator.RemoveAttribute,
|
||||
operator.AddMaterialAttribute,
|
||||
operator.RemoveMaterialAttribute,
|
||||
operator.QuickProjectSetup,
|
||||
operator.SelectGlobalId,
|
||||
operator.SelectAttribute,
|
||||
operator.SelectPset,
|
||||
operator.CreateAggregate,
|
||||
operator.EditAggregate,
|
||||
operator.SaveAggregate,
|
||||
operator.ExplodeAggregate,
|
||||
operator.AssignClassification,
|
||||
operator.UnassignClassification,
|
||||
operator.RemoveClassification,
|
||||
operator.FetchLibraryInformation,
|
||||
operator.FetchExternalMaterial,
|
||||
operator.FetchObjectPassport,
|
||||
operator.AddSubcontext,
|
||||
operator.RemoveSubcontext,
|
||||
operator.CutSection,
|
||||
operator.CreateSheet,
|
||||
operator.OpenSheet,
|
||||
operator.OpenCompiledSheet,
|
||||
operator.AddViewToSheet,
|
||||
operator.CreateSheets,
|
||||
operator.GenerateDigitalTwin,
|
||||
operator.CreateView,
|
||||
operator.OpenView,
|
||||
operator.ActivateView,
|
||||
operator.ExecuteIfcDiff,
|
||||
operator.AssignContext,
|
||||
operator.SetViewPreset1,
|
||||
operator.OpenUpstream,
|
||||
operator.Uninstall,
|
||||
prop.BcfTopic,
|
||||
prop.BcfTopicLabel,
|
||||
prop.BcfTopicFile,
|
||||
prop.BcfTopicLink,
|
||||
prop.BcfTopicDocumentReference,
|
||||
prop.BcfTopicRelatedTopic,
|
||||
prop.Subcontext,
|
||||
prop.BIMProperties,
|
||||
prop.BCFProperties,
|
||||
prop.DocProperties,
|
||||
prop.BIMLibrary,
|
||||
prop.MapConversion,
|
||||
prop.TargetCRS,
|
||||
prop.Attribute,
|
||||
prop.BoundaryCondition,
|
||||
prop.PsetQto,
|
||||
prop.Document,
|
||||
prop.Classification,
|
||||
prop.GlobalId,
|
||||
prop.BIMObjectProperties,
|
||||
prop.BIMMaterialProperties,
|
||||
prop.SweptSolid,
|
||||
prop.BIMMeshProperties,
|
||||
prop.BIMCameraProperties,
|
||||
ui.BIM_PT_documentation,
|
||||
ui.BIM_PT_bim,
|
||||
ui.BIM_PT_search,
|
||||
ui.BIM_PT_bcf,
|
||||
ui.BIM_PT_owner,
|
||||
ui.BIM_PT_context,
|
||||
ui.BIM_PT_qa,
|
||||
ui.BIM_PT_library,
|
||||
ui.BIM_PT_gis,
|
||||
ui.BIM_PT_diff,
|
||||
ui.BIM_PT_mvd,
|
||||
ui.BIM_PT_material,
|
||||
ui.BIM_PT_mesh,
|
||||
ui.BIM_PT_object,
|
||||
ui.BIM_PT_camera,
|
||||
ui.BIM_UL_topics,
|
||||
ui.BIM_ADDON_preferences,
|
||||
)
|
||||
|
||||
def menu_func_export(self, context):
|
||||
self.layout.operator(operator.ExportIFC.bl_idname,
|
||||
text="Industry Foundation Classes (.ifc)")
|
||||
|
||||
def menu_func_import(self, context):
|
||||
self.layout.operator(operator.ImportIFC.bl_idname,
|
||||
text="Industry Foundation Classes (.ifc)")
|
||||
|
||||
def on_register(scene):
|
||||
prop.setDefaultProperties(scene)
|
||||
bpy.app.handlers.scene_update_post.remove(on_register)
|
||||
|
||||
def register():
|
||||
for cls in classes:
|
||||
bpy.utils.register_class(cls)
|
||||
bpy.app.handlers.depsgraph_update_post.append(on_register)
|
||||
bpy.app.handlers.load_post.append(prop.setDefaultProperties)
|
||||
bpy.types.TOPBAR_MT_file_export.append(menu_func_export)
|
||||
bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
|
||||
bpy.types.Scene.BIMProperties = bpy.props.PointerProperty(type=prop.BIMProperties)
|
||||
bpy.types.Scene.BCFProperties = bpy.props.PointerProperty(type=prop.BCFProperties)
|
||||
bpy.types.Scene.DocProperties = bpy.props.PointerProperty(type=prop.DocProperties)
|
||||
bpy.types.Scene.BIMLibrary = bpy.props.PointerProperty(type=prop.BIMLibrary)
|
||||
bpy.types.Scene.MapConversion = bpy.props.PointerProperty(type=prop.MapConversion)
|
||||
bpy.types.Scene.TargetCRS = bpy.props.PointerProperty(type=prop.TargetCRS)
|
||||
bpy.types.Object.BIMObjectProperties = bpy.props.PointerProperty(type=prop.BIMObjectProperties)
|
||||
bpy.types.Collection.BIMObjectProperties = bpy.props.PointerProperty(type=prop.BIMObjectProperties)
|
||||
bpy.types.Material.BIMMaterialProperties = bpy.props.PointerProperty(type=prop.BIMMaterialProperties)
|
||||
bpy.types.Mesh.BIMMeshProperties = bpy.props.PointerProperty(type=prop.BIMMeshProperties)
|
||||
bpy.types.Camera.BIMCameraProperties = bpy.props.PointerProperty(type=prop.BIMCameraProperties)
|
||||
|
||||
def unregister():
|
||||
for cls in reversed(classes):
|
||||
bpy.utils.unregister_class(cls)
|
||||
bpy.app.handlers.load_post.remove(prop.setDefaultProperties)
|
||||
bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)
|
||||
bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
|
||||
del(bpy.types.Scene.BIMProperties)
|
||||
del(bpy.types.Scene.BCFProperties)
|
||||
del(bpy.types.Scene.DocProperties)
|
||||
del(bpy.types.Scene.MapConversion)
|
||||
del(bpy.types.Scene.TargetCRS)
|
||||
del(bpy.types.Object.BIMObjectProperties)
|
||||
del(bpy.types.Collection.BIMObjectProperties)
|
||||
del(bpy.types.Material.BIMMaterialProperties)
|
||||
del(bpy.types.Mesh.BIMMeshProperties)
|
||||
del(bpy.types.Camera.BIMCameraProperties)
|
||||
|
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 821 KiB After Width: | Height: | Size: 821 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
@@ -1,3 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
# This can be packaged with `pyinstaller --onefile --clean --icon=icon.ico ifcpatch.py`
|
||||
|
||||
import ifcopenshell
|
||||
import logging
|
||||
import argparse
|
||||
|
||||