mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Implement support for IfcLibraryInformation like a Git server
This commit is contained in:
@@ -95,6 +95,7 @@ def register():
|
||||
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.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)
|
||||
|
||||
@@ -865,9 +865,9 @@ class IfcExporter():
|
||||
self.create_units()
|
||||
self.create_people()
|
||||
self.create_organisations()
|
||||
self.create_library_information()
|
||||
self.create_rep_context()
|
||||
self.create_project()
|
||||
self.create_library_information()
|
||||
self.create_documents()
|
||||
self.create_classifications()
|
||||
self.create_classification_references()
|
||||
@@ -1001,7 +1001,18 @@ class IfcExporter():
|
||||
information = self.ifc_parser.library_information
|
||||
if not information:
|
||||
return
|
||||
# TODO
|
||||
information['attributes']['Publisher'] = self.owner_history.OwningUser
|
||||
information['ifc'] = self.file.create_entity('IfcLibraryInformation',
|
||||
**information['attributes'])
|
||||
print(information['ifc'])
|
||||
print(self.ifc_parser.project['ifc'])
|
||||
self.file.createIfcRelAssociatesLibrary(
|
||||
ifcopenshell.guid.new(),
|
||||
self.owner_history,
|
||||
information['attributes']['Name'],
|
||||
information['attributes']['Description'],
|
||||
[self.ifc_parser.project['ifc']],
|
||||
information['ifc'])
|
||||
|
||||
def create_documents(self):
|
||||
for document in self.ifc_parser.documents.values():
|
||||
|
||||
@@ -313,7 +313,7 @@ class BIM_PT_library(Panel):
|
||||
scene = context.scene
|
||||
bim_properties = scene.BIMProperties
|
||||
|
||||
layout.row().prop(scene.BIMProperties, 'has_georeferencing')
|
||||
layout.row().prop(scene.BIMProperties, 'has_library')
|
||||
|
||||
layout.label(text="Project Library:")
|
||||
layout.row().prop(scene.BIMLibrary, 'location')
|
||||
|
||||
Reference in New Issue
Block a user