summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThaHobbyist2025-01-20 16:50:02 +0530
committerThaHobbyist2025-01-20 16:50:02 +0530
commit3ef6586089844fcf5be7670d88db95dffd37d632 (patch)
treec3e976640734c215ffc6cafdecde28415bfb1ea2
parent04e7007a3b25a73e1807e6a2c8623849ea441fb9 (diff)
downloadventurial-3ef6586089844fcf5be7670d88db95dffd37d632.tar.gz
venturial-3ef6586089844fcf5be7670d88db95dffd37d632.tar.bz2
venturial-3ef6586089844fcf5be7670d88db95dffd37d632.zip
Fixed Data changes in UIList
-rwxr-xr-xmodels/run_panel_operators.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/models/run_panel_operators.py b/models/run_panel_operators.py
index 8cce7e8..d219bcb 100755
--- a/models/run_panel_operators.py
+++ b/models/run_panel_operators.py
@@ -204,7 +204,7 @@ class VNT_OT_fill_dict_file(Operator):
#Add blocks to Dictionary
for i in scn.bcustom:
- bmdict['blocks'].append([hex_strtolist(i.name), [scn.cell_x, scn.cell_y, scn.cell_z], i.grading])
+ bmdict['blocks'].append([hex_strtolist(i.name), [i.setcellx, i.setcelly, i.setcellz], i.grading])
#Add boundary(faces) to Dictionary
for i in scn.fcustom:
@@ -258,7 +258,16 @@ class VNT_OT_fill_dict_file(Operator):
vert_index.append(bmdict["vertices"].index(list(edge.vc[0].vert_loc)))
vert_index.append(bmdict["vertices"].index(list(edge.vc[2].vert_loc)))
- e_verts = [list(v.vert_loc) for v in edge.vert_collection]
+ # f"{context.scene.ecustom[context.scene.ecustom_index].name}0{index+1}"
+ # ob = bpy.data.objects[sr]
+ # layout.prop(ob, 'location')
+
+ e_verts = []
+ length = len(edge.vert_collection)
+ for i in range(length):
+ _a_ = bpy.data.objects[f"{edge.name}0{i+1}"]
+ e_verts.append(list(_a_.location))
+ # e_verts = [list(v.vert_loc) for v in edge.vert_collection]
bmdict["edges"].append([e_type, vert_index, e_verts])
m = json.dumps(bmdict, sort_keys=True, indent=2)