mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
black .
This commit is contained in:
@@ -1210,6 +1210,7 @@ class PlanLevelDecorator(BaseDecorator):
|
||||
rl = self.format_value(context, z)
|
||||
text = "{}{}".format("" if z < 0 else "+", rl)
|
||||
return text
|
||||
|
||||
self.draw_dimension_text(
|
||||
context,
|
||||
get_text,
|
||||
|
||||
@@ -1270,9 +1270,9 @@ class CreateDrawing(bpy.types.Operator):
|
||||
layer_material_name = layer_material.Name or "null"
|
||||
layer_material_name = tool.Drawing.canonicalise_class_name(layer_material_name)
|
||||
classes.append(f"layer-material-{layer_material_name}")
|
||||
|
||||
|
||||
# Add material category if available
|
||||
if hasattr(layer_material, 'Category') and layer_material.Category:
|
||||
if hasattr(layer_material, "Category") and layer_material.Category:
|
||||
layer_material_category = tool.Drawing.canonicalise_class_name(layer_material.Category)
|
||||
classes.append(f"layer-material-category-{layer_material_category}")
|
||||
|
||||
|
||||
@@ -1428,7 +1428,12 @@ class RefreshLinkedAggregate(bpy.types.Operator, tool.Ifc.Operator):
|
||||
index = pset["Index"]
|
||||
annotations = get_assignments(element)
|
||||
container = ifcopenshell.util.element.get_container(element)
|
||||
original_data[group][index] = {"Name": pset["Name"], "Aggregate_Index": pset["Aggregate_Index"], "Assignment": annotations, "Container": container}
|
||||
original_data[group][index] = {
|
||||
"Name": pset["Name"],
|
||||
"Aggregate_Index": pset["Aggregate_Index"],
|
||||
"Assignment": annotations,
|
||||
"Container": container,
|
||||
}
|
||||
|
||||
parts = ifcopenshell.util.element.get_parts(element)
|
||||
if parts:
|
||||
@@ -1479,7 +1484,11 @@ class RefreshLinkedAggregate(bpy.types.Operator, tool.Ifc.Operator):
|
||||
properties={"Aggregate_Index": int(original_data[group][index]["Aggregate_Index"])},
|
||||
)
|
||||
bonsai.core.spatial.assign_container(
|
||||
tool.Ifc, tool.Collector, tool.Spatial, container=original_data[group][index]["Container"], element_obj=obj
|
||||
tool.Ifc,
|
||||
tool.Collector,
|
||||
tool.Spatial,
|
||||
container=original_data[group][index]["Container"],
|
||||
element_obj=obj,
|
||||
)
|
||||
for part in ifcopenshell.util.element.get_parts(tool.Ifc.get_entity(obj)):
|
||||
tool.Collector.assign(tool.Ifc.get_object(part))
|
||||
|
||||
@@ -411,7 +411,6 @@ class BIM_PT_object_material(Panel):
|
||||
row.enabled = self.props.use_custom_offset
|
||||
|
||||
|
||||
|
||||
class BIM_UL_materials(UIList):
|
||||
def draw_item(
|
||||
self,
|
||||
|
||||
@@ -2216,7 +2216,7 @@ class Drawing(bonsai.core.tool.Drawing):
|
||||
continue
|
||||
if (hide := non_ifc_objects_hide.get(obj)) is not None:
|
||||
obj.hide_set(hide)
|
||||
obj.hide_render = hide
|
||||
obj.hide_render = hide
|
||||
else:
|
||||
obj.hide_render = True
|
||||
|
||||
|
||||
@@ -404,7 +404,6 @@ class Raycast(bonsai.core.tool.Raycast):
|
||||
):
|
||||
snap_threshold = rv3d.window_matrix.to_scale()[1] * -1 / 100
|
||||
|
||||
|
||||
try:
|
||||
loc = view3d_utils.region_2d_to_location_3d(region, rv3d, mouse_pos, ray_direction)
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user