mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
error message on setting flow direction for disconnected port
previously it just did nothing which was a bit confusing
This commit is contained in:
@@ -201,6 +201,11 @@ class SetFlowDirection(bpy.types.Operator, Operator):
|
||||
direction: bpy.props.StringProperty()
|
||||
|
||||
def _execute(self, context):
|
||||
port = tool.Ifc.get_entity(context.active_object)
|
||||
second_port = tool.System.get_connected_port(port)
|
||||
if not second_port:
|
||||
self.report({"ERROR"}, "To set flow direction port has to be connected to another one.")
|
||||
return
|
||||
core.set_flow_direction(
|
||||
tool.Ifc, tool.System, port=tool.Ifc.get_entity(context.active_object), direction=self.direction
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user