Skip to content

Commit

Permalink
fixed renaming JBeam nodes where new Blender position wasn't included
Browse files Browse the repository at this point in the history
  • Loading branch information
amatteo committed Sep 15, 2023
1 parent 2c2d4cf commit 57fb704
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jbeam_editor/export_jbeam.py
Expand Up @@ -481,7 +481,9 @@ def export_existing_jbeam(context, obj, obj_data, bm, init_node_id_layer, node_i
if isinstance(row_data, list):
curr_node_id = row_data[0]
if curr_node_id in true_node_renames:
row_data[0] = true_node_renames[curr_node_id]
new_node_id = true_node_renames[curr_node_id]
new_pos = all_nodes[new_node_id]['blender_node']['pos']
row_data[0], row_data[1], row_data[2], row_data[3] = new_node_id, new_pos[0], new_pos[1], new_pos[2]
else:
if 'blender_node' in all_nodes[curr_node_id]:
new_pos = all_nodes[curr_node_id]['blender_node']['pos']
Expand All @@ -491,7 +493,7 @@ def export_existing_jbeam(context, obj, obj_data, bm, init_node_id_layer, node_i
#print('nodes to delete:', nodes_to_delete)
#print('node renames:', true_node_renames)

# Traverse AST nodes and update AST nodes from SJSON data and 'nodes_to_add' and 'nodes_to_delete'
# Traverse AST nodes and update them from SJSON data, add JBeam nodes, and delete JBeam nodes

stack = []
in_dict = True
Expand Down

0 comments on commit 57fb704

Please sign in to comment.