mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 11:12:47 +00:00
black format
This commit is contained in:
@@ -1513,7 +1513,11 @@ class ActivateDrawing(bpy.types.Operator):
|
|||||||
bl_idname = "bim.activate_drawing"
|
bl_idname = "bim.activate_drawing"
|
||||||
bl_label = "Activate Drawing"
|
bl_label = "Activate Drawing"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
bl_description = "Activates the selected drawing view.\n\n" + "ALT+CLICK to keep the viewport position.\n\n" + "SHIFT+CLICK activiate drawing without turning objects on/off."
|
bl_description = (
|
||||||
|
"Activates the selected drawing view.\n\n"
|
||||||
|
+ "ALT+CLICK to keep the viewport position.\n\n"
|
||||||
|
+ "SHIFT+CLICK activiate drawing without turning objects on/off."
|
||||||
|
)
|
||||||
|
|
||||||
drawing: bpy.props.IntProperty()
|
drawing: bpy.props.IntProperty()
|
||||||
camera_view_point: bpy.props.BoolProperty(name="Camera View Point", default=True, options={"SKIP_SAVE"})
|
camera_view_point: bpy.props.BoolProperty(name="Camera View Point", default=True, options={"SKIP_SAVE"})
|
||||||
|
|||||||
@@ -433,9 +433,9 @@ class BIM_PT_sheets(Panel):
|
|||||||
|
|
||||||
if active_sheet.reference_type == "DRAWING":
|
if active_sheet.reference_type == "DRAWING":
|
||||||
drawingnamesvg = active_sheet.name
|
drawingnamesvg = active_sheet.name
|
||||||
drawingname = drawingnamesvg.split('.')[0]
|
drawingname = drawingnamesvg.split(".")[0]
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
ifc_annotations = ifc_file.by_type('IfcAnnotation')
|
ifc_annotations = ifc_file.by_type("IfcAnnotation")
|
||||||
for annotation in ifc_annotations:
|
for annotation in ifc_annotations:
|
||||||
if annotation.Name == drawingname:
|
if annotation.Name == drawingname:
|
||||||
drawingid = annotation.id()
|
drawingid = annotation.id()
|
||||||
|
|||||||
@@ -104,8 +104,6 @@ class CloseError(bpy.types.Operator):
|
|||||||
col.label(text="Warning: your model may be damaged.")
|
col.label(text="Warning: your model may be damaged.")
|
||||||
col.label(text="Really continue?")
|
col.label(text="Really continue?")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
return context.window_manager.invoke_props_dialog(self)
|
return context.window_manager.invoke_props_dialog(self)
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class Collector(blenderbim.core.tool.Collector):
|
|||||||
# "Collection" (which is the default collection that comes with
|
# "Collection" (which is the default collection that comes with
|
||||||
# a Blender session)
|
# a Blender session)
|
||||||
if "Ifc" in users_collection.name or users_collection.name == "Collection":
|
if "Ifc" in users_collection.name or users_collection.name == "Collection":
|
||||||
print('removing', users_collection, 'from', obj)
|
print("removing", users_collection, "from", obj)
|
||||||
users_collection.objects.unlink(obj)
|
users_collection.objects.unlink(obj)
|
||||||
|
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
|
|||||||
@@ -229,7 +229,9 @@ def i_see_the_prop_property_is_value(prop, value):
|
|||||||
panel_spy.refresh_spy()
|
panel_spy.refresh_spy()
|
||||||
for spied_prop in panel_spy.spied_props:
|
for spied_prop in panel_spy.spied_props:
|
||||||
if prop in (spied_prop["name"], spied_prop["text"], spied_prop["icon"]):
|
if prop in (spied_prop["name"], spied_prop["text"], spied_prop["icon"]):
|
||||||
assert spied_prop["value"] == value, f"Property {prop} value is not {value} - it is actually {spied_prop['value']}"
|
assert (
|
||||||
|
spied_prop["value"] == value
|
||||||
|
), f"Property {prop} value is not {value} - it is actually {spied_prop['value']}"
|
||||||
return
|
return
|
||||||
assert False, f"Property {prop} not found in {panel_spy.spied_props}"
|
assert False, f"Property {prop} not found in {panel_spy.spied_props}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user