Skip to content

Commit 21dc178

Browse files
committed
V0.8 - some server fixes.
1 parent 44cb92e commit 21dc178

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

BEngine-Py/bengine/BENetworking.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020

2121
def handle_client(client_socket, addr):
22-
print('handle client')
23-
2422
# global SERVER_SOCKET
2523

2624
be_paths = BESettings.START_PARAMS
@@ -49,24 +47,31 @@ def handle_client(client_socket, addr):
4947
print(traceback.format_exc())
5048

5149
if be_base_stuff.run_type == BESettings.RunNodesType.RunNodes:
50+
js_output_data = {}
5251

53-
# Get Data
54-
try:
55-
js_inputs = js_base_stuff["BEngineInputs"]
56-
js_output_data = BERunNodes.RunNodes(context, be_paths, js_inputs, node_tree,
57-
process_gn_obj, geom_mod, be_base_stuff)
52+
if node_tree:
53+
# Get Data
54+
try:
55+
js_inputs = js_base_stuff["BEngineInputs"]
56+
js_output_data = BERunNodes.RunNodes(context, be_paths, js_inputs, node_tree,
57+
process_gn_obj, geom_mod, be_base_stuff)
5858

59-
except Exception as e:
60-
print("There was a Problem During RunNodes.")
61-
print(traceback.format_exc())
59+
except Exception as e:
60+
print("There was a Problem During RunNodes.")
61+
print(traceback.format_exc())
6262

63-
js_output_data = {}
63+
js_output_data = {}
64+
else:
65+
print("NodeTree is None. Probably the NodeTree is Wrong.")
6466

6567
# Send
6668
client_socket.sendall(str.encode(json.dumps(js_output_data)))
6769

6870
elif be_base_stuff.run_type == BESettings.RunNodesType.UpdateNodes:
69-
BERunNodes.SaveBlenderInputs(be_base_stuff, node_tree)
71+
if node_tree:
72+
BERunNodes.SaveBlenderInputs(be_base_stuff, node_tree)
73+
else:
74+
print("NodeTree is None. Probably the NodeTree is Wrong.")
7075

7176

7277
AddBackServer(0.01)

BEngine-Py/bengine/Version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = 0.7
1+
VERSION = 0.8

0 commit comments

Comments
 (0)