From 75f19d685c3d42f72c67a4daa7578c73b91b2c59 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Tue, 25 Feb 2025 23:39:33 -0700 Subject: [PATCH] Milestone --- .../__pycache__/data_manager.cpython-312.pyc | Bin 3596 -> 3596 bytes Workflows/Flyff/Flyff - Low Health Alert.json | 379 ++++++++++++++++++ .../{ => Flyff}/Flyff EXP Predictor.json | 0 .../Basic_Data_Node_Connection.json | 0 Workflows/test.json | 101 ----- Workflows/test2.json | 139 ------- borealis.py | 30 +- 7 files changed, 393 insertions(+), 256 deletions(-) create mode 100644 Workflows/Flyff/Flyff - Low Health Alert.json rename Workflows/{ => Flyff}/Flyff EXP Predictor.json (100%) rename Workflows/{ => Testing}/Basic_Data_Node_Connection.json (100%) delete mode 100644 Workflows/test.json delete mode 100644 Workflows/test2.json diff --git a/Modules/__pycache__/data_manager.cpython-312.pyc b/Modules/__pycache__/data_manager.cpython-312.pyc index 22b6786ef3efab878aac3ede8c3173df7d97de2f..b4a2b38e88d0cfa9a325228bf60b7cba6ae3a022 100644 GIT binary patch delta 20 acmeB?>5<_+&CAQh00h%F@7u`D$Oiy6HU%C4 delta 20 acmeB?>5<_+&CAQh00a)MTQ_nu@&N!b6a-KJ diff --git a/Workflows/Flyff/Flyff - Low Health Alert.json b/Workflows/Flyff/Flyff - Low Health Alert.json new file mode 100644 index 0000000..19bcc9b --- /dev/null +++ b/Workflows/Flyff/Flyff - Low Health Alert.json @@ -0,0 +1,379 @@ +{ + "graph":{ + "layout_direction":0, + "acyclic":true, + "pipe_collision":false, + "pipe_slicing":true, + "pipe_style":1, + "accept_connection_types":{}, + "reject_connection_types":{} + }, + "nodes":{ + "0x2697e9777d0":{ + "type_":"bunny-lab.io.flyff_character_status_node.FlyffCharacterStatusNode", + "icon":null, + "name":"Flyff - Character Status", + "color":[ + 13, + 18, + 23, + 255 + ], + "border_color":[ + 74, + 84, + 85, + 255 + ], + "text_color":[ + 255, + 255, + 255, + 180 + ], + "disabled":false, + "selected":false, + "visible":true, + "width":278.0, + "height":200.20000000000002, + "pos":[ + -162.4474451079301, + 412.29351565404465 + ], + "layout_direction":0, + "port_deletion_allowed":false, + "subgraph_session":{}, + "custom":{ + "hp":"HP: 0/0", + "mp":"MP: 0/0", + "fp":"FP: 0/0", + "exp":"EXP: 0.0%" + } + }, + "0x2697f589250":{ + "type_":"bunny-lab.io.data_node.DataNode", + "icon":null, + "name":"Data Node", + "color":[ + 13, + 18, + 23, + 255 + ], + "border_color":[ + 74, + 84, + 85, + 255 + ], + "text_color":[ + 255, + 255, + 255, + 180 + ], + "disabled":false, + "selected":false, + "visible":true, + "width":269.0, + "height":74.2, + "pos":[ + -46.54926789642434, + 276.44565220121416 + ], + "layout_direction":0, + "port_deletion_allowed":false, + "subgraph_session":{}, + "custom":{ + "value":"0.40" + } + }, + "0x2697eeb2960":{ + "type_":"bunny-lab.io.math_node.MathOperationNode", + "icon":null, + "name":"Math Operation", + "color":[ + 13, + 18, + 23, + 255 + ], + "border_color":[ + 74, + 84, + 85, + 255 + ], + "text_color":[ + 255, + 255, + 255, + 180 + ], + "disabled":false, + "selected":false, + "visible":true, + "width":269.0, + "height":162.4, + "pos":[ + 263.14586137366473, + 175.74723593547986 + ], + "layout_direction":0, + "port_deletion_allowed":false, + "subgraph_session":{}, + "custom":{ + "operator":"Multiply", + "calc_result":"0.0", + "value":"0.0" + } + }, + "0x2697ea1b560":{ + "type_":"bunny-lab.io.flyff_hp_current_node.FlyffHPCurrentNode", + "icon":null, + "name":"Flyff - HP Current (API Connected)", + "color":[ + 13, + 18, + 23, + 255 + ], + "border_color":[ + 74, + 84, + 85, + 255 + ], + "text_color":[ + 255, + 255, + 255, + 180 + ], + "disabled":false, + "selected":false, + "visible":true, + "width":378.0, + "height":74.2, + "pos":[ + 188.09704170391905, + 29.44953683243171 + ], + "layout_direction":0, + "port_deletion_allowed":false, + "subgraph_session":{}, + "custom":{ + "value":"0" + } + }, + "0x2697f589be0":{ + "type_":"bunny-lab.io.flyff_hp_total_node.FlyffHPTotalNode", + "icon":null, + "name":"Flyff - HP Total (API Connected)", + "color":[ + 13, + 18, + 23, + 255 + ], + "border_color":[ + 74, + 84, + 85, + 255 + ], + "text_color":[ + 255, + 255, + 255, + 180 + ], + "disabled":false, + "selected":false, + "visible":true, + "width":364.0, + "height":74.2, + "pos":[ + -138.69781863016254, + 175.74723593547975 + ], + "layout_direction":0, + "port_deletion_allowed":false, + "subgraph_session":{}, + "custom":{ + "value":"0" + } + }, + "0x2697eb0e8d0":{ + "type_":"bunny-lab.io.backdrop.BackdropNode", + "icon":null, + "name":"Calculate 40% of Total HP", + "color":[ + 5, + 129, + 138, + 255 + ], + "border_color":[ + 74, + 84, + 85, + 255 + ], + "text_color":[ + 255, + 255, + 255, + 180 + ], + "disabled":false, + "selected":false, + "visible":true, + "width":728.2402137175101, + "height":257.0476243986018, + "pos":[ + -164.34741522615138, + 125.39802780261283 + ], + "layout_direction":0, + "port_deletion_allowed":false, + "subgraph_session":{}, + "custom":{ + "backdrop_text":"" + } + }, + "0x2697e856d20":{ + "type_":"bunny-lab.io.comparison_node.ComparisonNode", + "icon":null, + "name":"Comparison Node", + "color":[ + 13, + 18, + 23, + 255 + ], + "border_color":[ + 74, + 84, + 85, + 255 + ], + "text_color":[ + 255, + 255, + 255, + 180 + ], + "disabled":false, + "selected":false, + "visible":true, + "width":322.0, + "height":166.6, + "pos":[ + 625.0901688948422, + 218.49656359546154 + ], + "layout_direction":0, + "port_deletion_allowed":false, + "subgraph_session":{}, + "custom":{ + "input_type":"Number", + "operator":"Less Than or Equal (<=)", + "value":"1" + } + }, + "0x2697eeb1100":{ + "type_":"bunny-lab.io.flyff_low_health_alert_node.FlyffLowHealthAlertNode", + "icon":null, + "name":"Flyff - Low Health Alert", + "color":[ + 13, + 18, + 23, + 255 + ], + "border_color":[ + 74, + 84, + 85, + 255 + ], + "text_color":[ + 255, + 255, + 255, + 180 + ], + "disabled":false, + "selected":false, + "visible":true, + "width":324.0, + "height":181.3, + "pos":[ + 630.7900792495066, + 585.1907964121928 + ], + "layout_direction":0, + "port_deletion_allowed":false, + "subgraph_session":{}, + "custom":{ + "cb_1":true, + "cb_2":true, + "value":"1", + "beep_interval":"1.0s" + } + } + }, + "connections":[ + { + "out":[ + "0x2697f589250", + "Output" + ], + "in":[ + "0x2697eeb2960", + "B" + ] + }, + { + "in":[ + "0x2697eeb2960", + "A" + ], + "out":[ + "0x2697f589be0", + "value" + ] + }, + { + "out":[ + "0x2697eeb2960", + "Result" + ], + "in":[ + "0x2697e856d20", + "B" + ] + }, + { + "out":[ + "0x2697ea1b560", + "value" + ], + "in":[ + "0x2697e856d20", + "A" + ] + }, + { + "out":[ + "0x2697e856d20", + "Result" + ], + "in":[ + "0x2697eeb1100", + "Toggle (1 = On | 0 = Off)" + ] + } + ] +} \ No newline at end of file diff --git a/Workflows/Flyff EXP Predictor.json b/Workflows/Flyff/Flyff EXP Predictor.json similarity index 100% rename from Workflows/Flyff EXP Predictor.json rename to Workflows/Flyff/Flyff EXP Predictor.json diff --git a/Workflows/Basic_Data_Node_Connection.json b/Workflows/Testing/Basic_Data_Node_Connection.json similarity index 100% rename from Workflows/Basic_Data_Node_Connection.json rename to Workflows/Testing/Basic_Data_Node_Connection.json diff --git a/Workflows/test.json b/Workflows/test.json deleted file mode 100644 index ad50743..0000000 --- a/Workflows/test.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "graph":{ - "layout_direction":0, - "acyclic":true, - "pipe_collision":false, - "pipe_slicing":true, - "pipe_style":1, - "accept_connection_types":{}, - "reject_connection_types":{} - }, - "nodes":{ - "0x25032ceeae0":{ - "type_":"bunny-lab.io.data_node.DataNode", - "icon":null, - "name":"Data Node", - "color":[ - 13, - 18, - 23, - 255 - ], - "border_color":[ - 74, - 84, - 85, - 255 - ], - "text_color":[ - 255, - 255, - 255, - 180 - ], - "disabled":false, - "selected":false, - "visible":true, - "width":269.0, - "height":74.2, - "pos":[ - -140.9796961059538, - 314.0813482866816 - ], - "layout_direction":0, - "port_deletion_allowed":false, - "subgraph_session":{}, - "custom":{ - "value":"56" - } - }, - "0x250626018b0":{ - "type_":"bunny-lab.io.data_node.DataNode", - "icon":null, - "name":"Data Node 1", - "color":[ - 13, - 18, - 23, - 255 - ], - "border_color":[ - 74, - 84, - 85, - 255 - ], - "text_color":[ - 255, - 255, - 255, - 180 - ], - "disabled":false, - "selected":false, - "visible":true, - "width":269.0, - "height":74.2, - "pos":[ - 436.3232366823503, - 297.12809369166183 - ], - "layout_direction":0, - "port_deletion_allowed":false, - "subgraph_session":{}, - "custom":{ - "value":"56" - } - } - }, - "connections":[ - { - "out":[ - "0x25032ceeae0", - "Output" - ], - "in":[ - "0x250626018b0", - "Input" - ] - } - ] -} \ No newline at end of file diff --git a/Workflows/test2.json b/Workflows/test2.json deleted file mode 100644 index fe8f3be..0000000 --- a/Workflows/test2.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "graph":{ - "layout_direction":0, - "acyclic":true, - "pipe_collision":false, - "pipe_slicing":true, - "pipe_style":1, - "accept_connection_types":{}, - "reject_connection_types":{} - }, - "nodes":{ - "0x25062603f80":{ - "type_":"bunny-lab.io.data_node.DataNode", - "icon":null, - "name":"Data Node", - "color":[ - 13, - 18, - 23, - 255 - ], - "border_color":[ - 74, - 84, - 85, - 255 - ], - "text_color":[ - 255, - 255, - 255, - 180 - ], - "disabled":false, - "selected":false, - "visible":true, - "width":269.0, - "height":74.2, - "pos":[ - -183.12907239097774, - 203.3685322819906 - ], - "layout_direction":0, - "port_deletion_allowed":false, - "subgraph_session":{}, - "custom":{ - "value":"25" - } - }, - "0x250626141a0":{ - "type_":"bunny-lab.io.data_node.DataNode", - "icon":null, - "name":"Data Node 1", - "color":[ - 13, - 18, - 23, - 255 - ], - "border_color":[ - 74, - 84, - 85, - 255 - ], - "text_color":[ - 255, - 255, - 255, - 180 - ], - "disabled":false, - "selected":false, - "visible":true, - "width":269.0, - "height":74.2, - "pos":[ - 279.96246102035116, - 512.9884977805091 - ], - "layout_direction":0, - "port_deletion_allowed":false, - "subgraph_session":{}, - "custom":{ - "value":"25" - } - }, - "0x250626159d0":{ - "type_":"bunny-lab.io.backdrop.BackdropNode", - "icon":null, - "name":"flask", - "color":[ - 5, - 129, - 138, - 255 - ], - "border_color":[ - 74, - 84, - 85, - 255 - ], - "text_color":[ - 255, - 255, - 255, - 180 - ], - "disabled":false, - "selected":false, - "visible":true, - "width":804.65254462634, - "height":483.4329838785975, - "pos":[ - -205.22360825550223, - 146.33335545174936 - ], - "layout_direction":0, - "port_deletion_allowed":false, - "subgraph_session":{}, - "custom":{ - "backdrop_text":"" - } - } - }, - "connections":[ - { - "out":[ - "0x25062603f80", - "Output" - ], - "in":[ - "0x250626141a0", - "Input" - ] - } - ] -} \ No newline at end of file diff --git a/borealis.py b/borealis.py index cb43122..505d286 100644 --- a/borealis.py +++ b/borealis.py @@ -53,13 +53,13 @@ except ImportError as e: except Exception as e: print(f"Patch for PipeItem or NodeItem override failed: {e}") -# PATCH: Fix "module 'qtpy.QtGui' has no attribute 'QUndoStack'" -try: - from qtpy.QtWidgets import QUndoStack - import qtpy - qtpy.QtGui.QUndoStack = QUndoStack -except ImportError: - print("WARNING: Could not monkey-patch QUndoStack. You may see an error if OdenGraphQt needs it.") +## PATCH: Fix "module 'qtpy.QtGui' has no attribute 'QUndoStack'" (KEEP AROUND FOR LEGACY DOCUMENTATION) +#try: +# from qtpy.QtWidgets import QUndoStack +# import qtpy +# qtpy.QtGui.QUndoStack = QUndoStack +#except ImportError: +# print("WARNING: Could not monkey-patch QUndoStack.") # PATCH: Fix "'BackdropNodeItem' object has no attribute 'widgets'" by giving BackdropNodeItem a trivial widgets dictionary. try: @@ -236,16 +236,14 @@ if __name__ == "__main__": # Create categorized context menu graph_context_menu = graph.get_context_menu("graph") - + add_node_menu = graph_context_menu.add_menu("Add Node") + for category, node_classes in custom_nodes_by_category.items(): - category_menu = graph_context_menu.add_menu(category) # Create submenu for category + category_menu = add_node_menu.add_menu(category) for node_class in node_classes: node_type = f"{node_class.__identifier__}.{node_class.__name__}" node_name = node_class.NODE_NAME - category_menu.add_command( - f"Create: {node_name}", - make_node_command(graph, node_type) - ) + category_menu.add_command(f"{node_name}", make_node_command(graph, node_type)) # Add a "Remove Selected Node" command graph_context_menu.add_command( @@ -344,9 +342,9 @@ if __name__ == "__main__": text_edit = QtWidgets.QTextEdit() splitter.addWidget(text_edit) - # Set stretch factors: left pane gets 2/3, right pane gets 1/3. - splitter.setStretchFactor(0, 2) - splitter.setStretchFactor(1, 1) + # Set stretch factors + splitter.setStretchFactor(0, 2) # Split of Left Side + splitter.setStretchFactor(1, 3) # Split of Right Side # Reduce the Size of the Splitter Handle splitter.setHandleWidth(1)