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