Skip to content

Commit

Permalink
Merged examples, fixed checkpoint bug
Browse files Browse the repository at this point in the history
And added logs in Ryven_Console, so that all their method calls are also blocked and don't lead to any errors.
  • Loading branch information
leon-thomm committed Sep 26, 2020
1 parent 53bf7e5 commit 5ac0cde
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
8 changes: 7 additions & 1 deletion Ryven_Console/Ryven_Console.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,15 @@ def get_class_from_file(self, file_path, file_name, class_name):
return new_class


def clean_path_string(param):
if param.startswith('"') and param.endswith('"') or \
param.startswith('\'') and param.endswith('\''):
param = param[1:-1]
return param


if __name__ == '__main__':
if len(sys.argv) > 1:
Loader(sys.argv[1])
else:
Loader(input('please enter the path to a project to open: '))
Loader(clean_path_string(input('please enter the path to a project to open: ')))
6 changes: 3 additions & 3 deletions Ryven_Console/custom_src/NodeInstance.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from custom_src.Node import Node
from custom_src.NodeInstance_MainWidgetPlaceholder import NodeInstance_MainWidgetPlaceholder
from custom_src.PlaceholderClass import PlaceholderClass
from custom_src.PortInstance import InputPortInstance, OutputPortInstance


Expand All @@ -14,7 +14,7 @@ def __init__(self, parent_node: Node, flow, config):
self.initializing = True
self.init_config = config
self.special_actions = {}
self.main_widget = NodeInstance_MainWidgetPlaceholder() if parent_node.has_main_widget else None
self.main_widget = PlaceholderClass() if parent_node.has_main_widget else None


def initialized(self):
Expand Down Expand Up @@ -59,7 +59,7 @@ def remove_event(self):
# FURTHER API

def new_log(self, title):
pass
return PlaceholderClass()

def log_message(self, message: str, target='global'):
pass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class NodeInstance_MainWidgetPlaceholder:
class PlaceholderClass:
def __getattr__(self, item):
def method(*args):
pass
Expand All @@ -7,4 +7,4 @@ def method(*args):
def __setattr__(self, key, value):
if not hasattr(self, key):
return
super(NodeInstance_MainWidgetPlaceholder, self).__setattr__(key, value)
super(PlaceholderClass, self).__setattr__(key, value)
1 change: 1 addition & 0 deletions packages/std/nodes/std___Checkpoint0/std___Checkpoint0.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def action_remove_sequence_output(self, index):
'data': i}

def action_make_data(self):
self.passive = True
self.delete_input(0)
for i in range(self.num_exec_outputs):
self.delete_output(0)
Expand Down
2 changes: 1 addition & 1 deletion saves/examples.rpo

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion saves/examples2.rpo

This file was deleted.

Binary file removed saves/test.png
Binary file not shown.
1 change: 0 additions & 1 deletion saves/test.txt

This file was deleted.

0 comments on commit 5ac0cde

Please sign in to comment.