mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 13:52:23 +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()
|
direction: bpy.props.StringProperty()
|
||||||
|
|
||||||
def _execute(self, context):
|
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 hast to be connected to another one.")
|
||||||
|
return
|
||||||
core.set_flow_direction(
|
core.set_flow_direction(
|
||||||
tool.Ifc, tool.System, port=tool.Ifc.get_entity(context.active_object), direction=self.direction
|
tool.Ifc, tool.System, port=tool.Ifc.get_entity(context.active_object), direction=self.direction
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user