mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 14:07:43 +00:00
Cleaned up formatting to align with master v0.6 branch
This commit is contained in:
@@ -55,8 +55,8 @@ def set_active_camera_resolution(scene):
|
|||||||
if not scene.camera or "/" not in scene.camera.name or not scene.DocProperties.drawings:
|
if not scene.camera or "/" not in scene.camera.name or not scene.DocProperties.drawings:
|
||||||
return
|
return
|
||||||
if (
|
if (
|
||||||
scene.render.resolution_x != scene.camera.data.BIMCameraProperties.raster_x
|
scene.render.resolution_x != scene.camera.data.BIMCameraProperties.raster_x
|
||||||
or scene.render.resolution_y != scene.camera.data.BIMCameraProperties.raster_y
|
or scene.render.resolution_y != scene.camera.data.BIMCameraProperties.raster_y
|
||||||
):
|
):
|
||||||
scene.render.resolution_x = scene.camera.data.BIMCameraProperties.raster_x
|
scene.render.resolution_x = scene.camera.data.BIMCameraProperties.raster_x
|
||||||
scene.render.resolution_y = scene.camera.data.BIMCameraProperties.raster_y
|
scene.render.resolution_y = scene.camera.data.BIMCameraProperties.raster_y
|
||||||
@@ -145,9 +145,8 @@ class SelectGlobalId(bpy.types.Operator):
|
|||||||
for obj in bpy.context.visible_objects:
|
for obj in bpy.context.visible_objects:
|
||||||
index = obj.BIMObjectProperties.attributes.find("GlobalId")
|
index = obj.BIMObjectProperties.attributes.find("GlobalId")
|
||||||
if (
|
if (
|
||||||
index != -1
|
index != -1
|
||||||
and obj.BIMObjectProperties.attributes[
|
and obj.BIMObjectProperties.attributes[index].string_value == bpy.context.scene.BIMProperties.global_id
|
||||||
index].string_value == bpy.context.scene.BIMProperties.global_id
|
|
||||||
):
|
):
|
||||||
obj.select_set(True)
|
obj.select_set(True)
|
||||||
break
|
break
|
||||||
@@ -168,9 +167,9 @@ class SelectAttribute(bpy.types.Operator):
|
|||||||
continue
|
continue
|
||||||
value = object.BIMObjectProperties.attributes[index].string_value
|
value = object.BIMObjectProperties.attributes[index].string_value
|
||||||
if (
|
if (
|
||||||
bpy.context.scene.BIMProperties.search_regex
|
bpy.context.scene.BIMProperties.search_regex
|
||||||
and bpy.context.scene.BIMProperties.search_ignorecase
|
and bpy.context.scene.BIMProperties.search_ignorecase
|
||||||
and re.search(search_value, value, flags=re.IGNORECASE)
|
and re.search(search_value, value, flags=re.IGNORECASE)
|
||||||
):
|
):
|
||||||
object.select_set(True)
|
object.select_set(True)
|
||||||
elif bpy.context.scene.BIMProperties.search_regex and re.search(search_value, value):
|
elif bpy.context.scene.BIMProperties.search_regex and re.search(search_value, value):
|
||||||
@@ -201,9 +200,9 @@ class SelectPset(bpy.types.Operator):
|
|||||||
continue
|
continue
|
||||||
value = object.BIMObjectProperties.psets[pset_index].properties[prop_index].string_value
|
value = object.BIMObjectProperties.psets[pset_index].properties[prop_index].string_value
|
||||||
if (
|
if (
|
||||||
bpy.context.scene.BIMProperties.search_regex
|
bpy.context.scene.BIMProperties.search_regex
|
||||||
and bpy.context.scene.BIMProperties.search_ignorecase
|
and bpy.context.scene.BIMProperties.search_ignorecase
|
||||||
and re.search(search_value, value, flags=re.IGNORECASE)
|
and re.search(search_value, value, flags=re.IGNORECASE)
|
||||||
):
|
):
|
||||||
object.select_set(True)
|
object.select_set(True)
|
||||||
elif bpy.context.scene.BIMProperties.search_regex and re.search(search_value, value):
|
elif bpy.context.scene.BIMProperties.search_regex and re.search(search_value, value):
|
||||||
@@ -302,9 +301,9 @@ class SelectClass(bpy.types.Operator):
|
|||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
for object in bpy.context.visible_objects:
|
for object in bpy.context.visible_objects:
|
||||||
if (
|
if (
|
||||||
"/" in object.name
|
"/" in object.name
|
||||||
and object.name[0:3] == "Ifc"
|
and object.name[0:3] == "Ifc"
|
||||||
and object.name.split("/")[0] == bpy.context.scene.BIMProperties.ifc_class
|
and object.name.split("/")[0] == bpy.context.scene.BIMProperties.ifc_class
|
||||||
):
|
):
|
||||||
object.select_set(True)
|
object.select_set(True)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
@@ -317,19 +316,19 @@ class SelectType(bpy.types.Operator):
|
|||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
for object in bpy.context.visible_objects:
|
for object in bpy.context.visible_objects:
|
||||||
if (
|
if (
|
||||||
"/" in object.name
|
"/" in object.name
|
||||||
and object.name[0:3] == "Ifc"
|
and object.name[0:3] == "Ifc"
|
||||||
and object.name.split("/")[0] == bpy.context.scene.BIMProperties.ifc_class
|
and object.name.split("/")[0] == bpy.context.scene.BIMProperties.ifc_class
|
||||||
and "PredefinedType" in object.BIMObjectProperties.attributes
|
and "PredefinedType" in object.BIMObjectProperties.attributes
|
||||||
and object.BIMObjectProperties.attributes["PredefinedType"].string_value
|
and object.BIMObjectProperties.attributes["PredefinedType"].string_value
|
||||||
== bpy.context.scene.BIMProperties.ifc_predefined_type
|
== bpy.context.scene.BIMProperties.ifc_predefined_type
|
||||||
):
|
):
|
||||||
if bpy.context.scene.BIMProperties.ifc_predefined_type != "USERDEFINED":
|
if bpy.context.scene.BIMProperties.ifc_predefined_type != "USERDEFINED":
|
||||||
object.select_set(True)
|
object.select_set(True)
|
||||||
elif (
|
elif (
|
||||||
"ObjectType" in object.BIMObjectProperties.attributes
|
"ObjectType" in object.BIMObjectProperties.attributes
|
||||||
and object.BIMObjectProperties.attributes["ObjectType"].string_value
|
and object.BIMObjectProperties.attributes["ObjectType"].string_value
|
||||||
== bpy.context.scene.BIMProperties.ifc_userdefined_type
|
== bpy.context.scene.BIMProperties.ifc_userdefined_type
|
||||||
):
|
):
|
||||||
object.select_set(True)
|
object.select_set(True)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
@@ -424,8 +423,8 @@ class QAHelper:
|
|||||||
is_in_scenario = False
|
is_in_scenario = False
|
||||||
for source_line in source:
|
for source_line in source:
|
||||||
if (
|
if (
|
||||||
"Scenario: " in source_line
|
"Scenario: " in source_line
|
||||||
and bpy.context.scene.BIMProperties.scenario == source_line.strip()[len("Scenario: "):]
|
and bpy.context.scene.BIMProperties.scenario == source_line.strip()[len("Scenario: ") :]
|
||||||
):
|
):
|
||||||
is_in_scenario = True
|
is_in_scenario = True
|
||||||
elif is_in_scenario:
|
elif is_in_scenario:
|
||||||
@@ -716,7 +715,7 @@ class ActivateBcfViewpoint(bpy.types.Operator):
|
|||||||
def hex_to_rgb(self, value):
|
def hex_to_rgb(self, value):
|
||||||
value = value.lstrip("#")
|
value = value.lstrip("#")
|
||||||
lv = len(value)
|
lv = len(value)
|
||||||
t = tuple(int(value[i: i + lv // 3], 16) for i in range(0, lv, lv // 3))
|
t = tuple(int(value[i : i + lv // 3], 16) for i in range(0, lv, lv // 3))
|
||||||
return [t[0] / 255.0, t[1] / 255.0, t[2] / 255.0, 1]
|
return [t[0] / 255.0, t[1] / 255.0, t[2] / 255.0, 1]
|
||||||
|
|
||||||
|
|
||||||
@@ -2395,12 +2394,12 @@ class CutSection(bpy.types.Operator):
|
|||||||
obj.hide_set(True)
|
obj.hide_set(True)
|
||||||
for obj in bpy.context.visible_objects:
|
for obj in bpy.context.visible_objects:
|
||||||
if (
|
if (
|
||||||
not obj.data
|
not obj.data
|
||||||
or isinstance(obj.data, bpy.types.Camera)
|
or isinstance(obj.data, bpy.types.Camera)
|
||||||
or "IfcGrid/" in obj.name
|
or "IfcGrid/" in obj.name
|
||||||
or "IfcGridAxis/" in obj.name
|
or "IfcGridAxis/" in obj.name
|
||||||
or "IfcOpeningElement/" in obj.name
|
or "IfcOpeningElement/" in obj.name
|
||||||
or self.does_obj_have_target_view_representation(obj, camera)
|
or self.does_obj_have_target_view_representation(obj, camera)
|
||||||
):
|
):
|
||||||
previous_visibility[obj.name] = obj.hide_get()
|
previous_visibility[obj.name] = obj.hide_get()
|
||||||
obj.hide_set(True)
|
obj.hide_set(True)
|
||||||
@@ -2545,8 +2544,8 @@ class ActivateView(bpy.types.Operator):
|
|||||||
# We assume a convention that the 'Views' collection is directly
|
# We assume a convention that the 'Views' collection is directly
|
||||||
# in the project collection
|
# in the project collection
|
||||||
if (
|
if (
|
||||||
"Views" in project_collection.children
|
"Views" in project_collection.children
|
||||||
and collection.name in project_collection.children["Views"].children
|
and collection.name in project_collection.children["Views"].children
|
||||||
):
|
):
|
||||||
project_collection.children["Views"].children[collection.name].hide_viewport = True
|
project_collection.children["Views"].children[collection.name].hide_viewport = True
|
||||||
bpy.data.collections.get(collection.name).hide_render = True
|
bpy.data.collections.get(collection.name).hide_render = True
|
||||||
@@ -2605,9 +2604,9 @@ class SwitchContext(bpy.types.Operator):
|
|||||||
has_context = False
|
has_context = False
|
||||||
for context in self.obj.BIMObjectProperties.representation_contexts:
|
for context in self.obj.BIMObjectProperties.representation_contexts:
|
||||||
if (
|
if (
|
||||||
context.context == self.context
|
context.context == self.context
|
||||||
and context.name == self.subcontext
|
and context.name == self.subcontext
|
||||||
and context.target_view == self.target_view
|
and context.target_view == self.target_view
|
||||||
):
|
):
|
||||||
has_context = True
|
has_context = True
|
||||||
break
|
break
|
||||||
@@ -2634,16 +2633,16 @@ class SwitchContext(bpy.types.Operator):
|
|||||||
|
|
||||||
for rep in element.Representation.Representations:
|
for rep in element.Representation.Representations:
|
||||||
if (
|
if (
|
||||||
rep.ContextOfItems.is_a("IfcGeometricRepresentationSubContext")
|
rep.ContextOfItems.is_a("IfcGeometricRepresentationSubContext")
|
||||||
and rep.ContextOfItems.ContextType == self.context
|
and rep.ContextOfItems.ContextType == self.context
|
||||||
and rep.ContextOfItems.ContextIdentifier == self.subcontext
|
and rep.ContextOfItems.ContextIdentifier == self.subcontext
|
||||||
and rep.ContextOfItems.TargetView == self.target_view
|
and rep.ContextOfItems.TargetView == self.target_view
|
||||||
):
|
):
|
||||||
break
|
break
|
||||||
elif (
|
elif (
|
||||||
rep.ContextOfItems.is_a("IfcGeometricRepresentationContext")
|
rep.ContextOfItems.is_a("IfcGeometricRepresentationContext")
|
||||||
and rep.ContextOfItems.ContextType == self.context
|
and rep.ContextOfItems.ContextType == self.context
|
||||||
and rep.ContextOfItems.ContextIdentifier == self.subcontext
|
and rep.ContextOfItems.ContextIdentifier == self.subcontext
|
||||||
):
|
):
|
||||||
break
|
break
|
||||||
|
|
||||||
@@ -2978,8 +2977,7 @@ class AddSectionPlane(bpy.types.Operator):
|
|||||||
section.show_in_front = True
|
section.show_in_front = True
|
||||||
if bpy.context.active_object.select_get() and isinstance(bpy.context.active_object.data, bpy.types.Camera):
|
if bpy.context.active_object.select_get() and isinstance(bpy.context.active_object.data, bpy.types.Camera):
|
||||||
section.matrix_world = (
|
section.matrix_world = (
|
||||||
bpy.context.active_object.matrix_world @ Euler((radians(180.0), 0.0, 0.0),
|
bpy.context.active_object.matrix_world @ Euler((radians(180.0), 0.0, 0.0), "XYZ").to_matrix().to_4x4()
|
||||||
"XYZ").to_matrix().to_4x4()
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
section.rotation_euler = Euler((radians(180.0), 0.0, 0.0), "XYZ")
|
section.rotation_euler = Euler((radians(180.0), 0.0, 0.0), "XYZ")
|
||||||
@@ -3396,12 +3394,12 @@ class GenerateReferences(bpy.types.Operator):
|
|||||||
if self.camera.data.BIMCameraProperties.raster_x > self.camera.data.BIMCameraProperties.raster_y:
|
if self.camera.data.BIMCameraProperties.raster_x > self.camera.data.BIMCameraProperties.raster_y:
|
||||||
width = self.camera.data.ortho_scale
|
width = self.camera.data.ortho_scale
|
||||||
height = (
|
height = (
|
||||||
width / self.camera.data.BIMCameraProperties.raster_x * self.camera.data.BIMCameraProperties.raster_y
|
width / self.camera.data.BIMCameraProperties.raster_x * self.camera.data.BIMCameraProperties.raster_y
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
height = self.camera.data.ortho_scale
|
height = self.camera.data.ortho_scale
|
||||||
width = (
|
width = (
|
||||||
height / self.camera.data.BIMCameraProperties.raster_y * self.camera.data.BIMCameraProperties.raster_x
|
height / self.camera.data.BIMCameraProperties.raster_y * self.camera.data.BIMCameraProperties.raster_x
|
||||||
)
|
)
|
||||||
level_obj = annotation.Annotator.get_annotation_obj("Section Level", "curve")
|
level_obj = annotation.Annotator.get_annotation_obj("Section Level", "curve")
|
||||||
|
|
||||||
@@ -3587,9 +3585,9 @@ class PushRepresentation(bpy.types.Operator):
|
|||||||
|
|
||||||
def is_current_context(self, element):
|
def is_current_context(self, element):
|
||||||
return (
|
return (
|
||||||
element.ContextType == self.context
|
element.ContextType == self.context
|
||||||
and element.ContextIdentifier == self.subcontext
|
and element.ContextIdentifier == self.subcontext
|
||||||
and element.TargetView == self.target_view
|
and element.TargetView == self.target_view
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -3703,7 +3701,7 @@ class GuessQuantity(bpy.types.Operator):
|
|||||||
elif bpy.context.scene.unit_settings.system == "METRIC":
|
elif bpy.context.scene.unit_settings.system == "METRIC":
|
||||||
if bpy.context.scene.unit_settings.length_unit == "METERS":
|
if bpy.context.scene.unit_settings.length_unit == "METERS":
|
||||||
return None, "METRE"
|
return None, "METRE"
|
||||||
return bpy.context.scene.unit_settings.length_unit[0: -len("METERS")], "METRE"
|
return bpy.context.scene.unit_settings.length_unit[0 : -len("METERS")], "METRE"
|
||||||
|
|
||||||
|
|
||||||
class ExecuteBIMTester(bpy.types.Operator):
|
class ExecuteBIMTester(bpy.types.Operator):
|
||||||
@@ -3934,7 +3932,7 @@ class ActivateDrawingStyle(bpy.types.Operator):
|
|||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
if context.scene.camera.data.BIMCameraProperties.active_drawing_style_index < len(
|
if context.scene.camera.data.BIMCameraProperties.active_drawing_style_index < len(
|
||||||
bpy.context.scene.DocProperties.drawing_styles
|
bpy.context.scene.DocProperties.drawing_styles
|
||||||
):
|
):
|
||||||
self.drawing_style = bpy.context.scene.DocProperties.drawing_styles[
|
self.drawing_style = bpy.context.scene.DocProperties.drawing_styles[
|
||||||
context.scene.camera.data.BIMCameraProperties.active_drawing_style_index
|
context.scene.camera.data.BIMCameraProperties.active_drawing_style_index
|
||||||
@@ -4288,7 +4286,7 @@ class SetViewportShadowFromSun(bpy.types.Operator):
|
|||||||
# The vector used for the light direction is a bit funny
|
# The vector used for the light direction is a bit funny
|
||||||
mat = Matrix(((-1.0, 0.0, 0.0, 0.0), (0.0, 0, 1.0, 0.0), (-0.0, -1.0, 0, 0.0), (0.0, 0.0, 0.0, 1.0)))
|
mat = Matrix(((-1.0, 0.0, 0.0, 0.0), (0.0, 0, 1.0, 0.0), (-0.0, -1.0, 0, 0.0), (0.0, 0.0, 0.0, 1.0)))
|
||||||
context.scene.display.light_direction = mat.inverted() @ (
|
context.scene.display.light_direction = mat.inverted() @ (
|
||||||
context.active_object.matrix_world.to_quaternion() @ Vector((0, 0, -1))
|
context.active_object.matrix_world.to_quaternion() @ Vector((0, 0, -1))
|
||||||
)
|
)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
@@ -4346,8 +4344,8 @@ class RemoveFromPresentationLayer(bpy.types.Operator):
|
|||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
for el in bpy.context.selected_objects:
|
for el in bpy.context.selected_objects:
|
||||||
if el.BIMObjectProperties.presentation_layer.name != '':
|
if el.BIMObjectProperties.presentation_layer.name != "":
|
||||||
el.BIMObjectProperties.presentation_layer.name = ''
|
el.BIMObjectProperties.presentation_layer.name = ""
|
||||||
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
@@ -4461,7 +4459,7 @@ class SelectHighPolygonMeshes(bpy.types.Operator):
|
|||||||
results = {}
|
results = {}
|
||||||
for obj in bpy.data.objects:
|
for obj in bpy.data.objects:
|
||||||
if not isinstance(obj.data, bpy.types.Mesh) or len(obj.data.polygons) < int(
|
if not isinstance(obj.data, bpy.types.Mesh) or len(obj.data.polygons) < int(
|
||||||
bpy.context.scene.BIMDebugProperties.number_of_polygons
|
bpy.context.scene.BIMDebugProperties.number_of_polygons
|
||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ bcfviewpoints_enum = []
|
|||||||
@persistent
|
@persistent
|
||||||
def setDefaultProperties(scene):
|
def setDefaultProperties(scene):
|
||||||
if (
|
if (
|
||||||
bpy.context.scene.BIMProperties.has_model_context
|
bpy.context.scene.BIMProperties.has_model_context
|
||||||
and len(bpy.context.scene.BIMProperties.model_subcontexts) == 0
|
and len(bpy.context.scene.BIMProperties.model_subcontexts) == 0
|
||||||
):
|
):
|
||||||
subcontext = bpy.context.scene.BIMProperties.model_subcontexts.add()
|
subcontext = bpy.context.scene.BIMProperties.model_subcontexts.add()
|
||||||
subcontext.name = "Body"
|
subcontext.name = "Body"
|
||||||
@@ -170,9 +170,9 @@ def refreshPredefinedTypes(self, context):
|
|||||||
def getDiagramScales(self, context):
|
def getDiagramScales(self, context):
|
||||||
global diagram_scales_enum
|
global diagram_scales_enum
|
||||||
if (
|
if (
|
||||||
len(diagram_scales_enum) < 1
|
len(diagram_scales_enum) < 1
|
||||||
or (bpy.context.scene.unit_settings.system == "IMPERIAL" and len(diagram_scales_enum) == 13)
|
or (bpy.context.scene.unit_settings.system == "IMPERIAL" and len(diagram_scales_enum) == 13)
|
||||||
or (bpy.context.scene.unit_settings.system == "METRIC" and len(diagram_scales_enum) == 31)
|
or (bpy.context.scene.unit_settings.system == "METRIC" and len(diagram_scales_enum) == 31)
|
||||||
):
|
):
|
||||||
if bpy.context.scene.unit_settings.system == "IMPERIAL":
|
if bpy.context.scene.unit_settings.system == "IMPERIAL":
|
||||||
diagram_scales_enum = [
|
diagram_scales_enum = [
|
||||||
@@ -290,15 +290,15 @@ def getIfcProducts(self, context):
|
|||||||
[
|
[
|
||||||
(e, e, "")
|
(e, e, "")
|
||||||
for e in [
|
for e in [
|
||||||
"IfcElement",
|
"IfcElement",
|
||||||
"IfcElementType",
|
"IfcElementType",
|
||||||
"IfcSpatialElement",
|
"IfcSpatialElement",
|
||||||
"IfcGroup",
|
"IfcGroup",
|
||||||
"IfcStructural",
|
"IfcStructural",
|
||||||
"IfcPositioningElement",
|
"IfcPositioningElement",
|
||||||
"IfcContext",
|
"IfcContext",
|
||||||
"IfcAnnotation",
|
"IfcAnnotation",
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
return products_enum
|
return products_enum
|
||||||
@@ -374,7 +374,7 @@ def getTitleblocks(self, context):
|
|||||||
if len(titleblocks_enum) < 1:
|
if len(titleblocks_enum) < 1:
|
||||||
titleblocks_enum.clear()
|
titleblocks_enum.clear()
|
||||||
for filename in Path(os.path.join(context.scene.BIMProperties.data_dir, "templates", "titleblocks")).glob(
|
for filename in Path(os.path.join(context.scene.BIMProperties.data_dir, "templates", "titleblocks")).glob(
|
||||||
"*.svg"
|
"*.svg"
|
||||||
):
|
):
|
||||||
f = str(filename.stem)
|
f = str(filename.stem)
|
||||||
titleblocks_enum.append((f, f, ""))
|
titleblocks_enum.append((f, f, ""))
|
||||||
@@ -398,7 +398,7 @@ def getScenarios(self, context):
|
|||||||
lines = feature_file.readlines()
|
lines = feature_file.readlines()
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if "Scenario:" in line:
|
if "Scenario:" in line:
|
||||||
s = line.strip()[len("Scenario: "):]
|
s = line.strip()[len("Scenario: ") :]
|
||||||
scenarios_enum.append((s, s, ""))
|
scenarios_enum.append((s, s, ""))
|
||||||
return scenarios_enum
|
return scenarios_enum
|
||||||
|
|
||||||
@@ -666,7 +666,7 @@ class DrawingStyle(PropertyGroup):
|
|||||||
name: StringProperty(name="Name")
|
name: StringProperty(name="Name")
|
||||||
raster_style: StringProperty(name="Raster Style")
|
raster_style: StringProperty(name="Raster Style")
|
||||||
render_type: EnumProperty(
|
render_type: EnumProperty(
|
||||||
items=[("NONE", "None", ""), ("DEFAULT", "Default", ""), ("VIEWPORT", "Viewport", ""), ],
|
items=[("NONE", "None", ""), ("DEFAULT", "Default", ""), ("VIEWPORT", "Viewport", ""),],
|
||||||
name="Render Type",
|
name="Render Type",
|
||||||
default="VIEWPORT",
|
default="VIEWPORT",
|
||||||
)
|
)
|
||||||
@@ -739,7 +739,7 @@ class BIMTextProperties(PropertyGroup):
|
|||||||
name="Font Size",
|
name="Font Size",
|
||||||
)
|
)
|
||||||
symbol: EnumProperty(
|
symbol: EnumProperty(
|
||||||
items=[("None", "None", ""), ("rectangle-tag", "Rectangle Tag", ""), ("door-tag", "Door Tag", ""), ],
|
items=[("None", "None", ""), ("rectangle-tag", "Rectangle Tag", ""), ("door-tag", "Door Tag", ""),],
|
||||||
update=refreshFontSize,
|
update=refreshFontSize,
|
||||||
name="Symbol",
|
name="Symbol",
|
||||||
)
|
)
|
||||||
@@ -1532,7 +1532,7 @@ class BIMProperties(PropertyGroup):
|
|||||||
name="Temporary Section Cutaway Colour", subtype="COLOR", default=(1, 0, 0), min=0.0, max=1.0
|
name="Temporary Section Cutaway Colour", subtype="COLOR", default=(1, 0, 0), min=0.0, max=1.0
|
||||||
)
|
)
|
||||||
ifc_import_filter: EnumProperty(
|
ifc_import_filter: EnumProperty(
|
||||||
items=[("NONE", "None", ""), ("WHITELIST", "Whitelist", ""), ("BLACKLIST", "Blacklist", ""), ],
|
items=[("NONE", "None", ""), ("WHITELIST", "Whitelist", ""), ("BLACKLIST", "Blacklist", ""),],
|
||||||
name="Import Filter",
|
name="Import Filter",
|
||||||
)
|
)
|
||||||
ifc_selector: StringProperty(default="", name="IFC Selector")
|
ifc_selector: StringProperty(default="", name="IFC Selector")
|
||||||
@@ -1603,7 +1603,6 @@ class BIMProperties(PropertyGroup):
|
|||||||
presentation_layers: CollectionProperty(name="Presentation Layers", type=PresentationLayer)
|
presentation_layers: CollectionProperty(name="Presentation Layers", type=PresentationLayer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class BCFProperties(PropertyGroup):
|
class BCFProperties(PropertyGroup):
|
||||||
bcf_file: StringProperty(default="", name="BCF File")
|
bcf_file: StringProperty(default="", name="BCF File")
|
||||||
topics: CollectionProperty(name="BCF Topics", type=BcfTopic)
|
topics: CollectionProperty(name="BCF Topics", type=BcfTopic)
|
||||||
|
|||||||
@@ -1717,7 +1717,7 @@ class BIM_PT_bcf(Panel):
|
|||||||
layout.label(text="Document References:")
|
layout.label(text="Document References:")
|
||||||
for index, doc in enumerate(props.topic_document_references):
|
for index, doc in enumerate(props.topic_document_references):
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(doc, "name", text=f"File {index + 1} URI")
|
row.prop(doc, "name", text=f"File {index+1} URI")
|
||||||
if doc.is_external:
|
if doc.is_external:
|
||||||
row.operator("bim.open_bcf_document_reference", icon="URL", text="").data = "{}/{}".format(
|
row.operator("bim.open_bcf_document_reference", icon="URL", text="").data = "{}/{}".format(
|
||||||
props.topic_guid, index
|
props.topic_guid, index
|
||||||
@@ -1727,7 +1727,7 @@ class BIM_PT_bcf(Panel):
|
|||||||
props.topic_guid, index
|
props.topic_guid, index
|
||||||
)
|
)
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(doc, "description", text=f"File {index + 1} Description:")
|
row.prop(doc, "description", text=f"File {index+1} Description:")
|
||||||
|
|
||||||
layout.label(text="Related Topics:")
|
layout.label(text="Related Topics:")
|
||||||
for topic in props.topic_related_topics:
|
for topic in props.topic_related_topics:
|
||||||
|
|||||||
Reference in New Issue
Block a user