summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThaHobbyist2025-01-20 10:48:14 +0530
committerThaHobbyist2025-01-20 10:48:14 +0530
commit04e7007a3b25a73e1807e6a2c8623849ea441fb9 (patch)
tree7a5ef182f4bef2e1cd147fc81d180cf32649a641
parent7cd9ef9d02b65c285578ef67e596d763ea3288e5 (diff)
downloadventurial-04e7007a3b25a73e1807e6a2c8623849ea441fb9.tar.gz
venturial-04e7007a3b25a73e1807e6a2c8623849ea441fb9.tar.bz2
venturial-04e7007a3b25a73e1807e6a2c8623849ea441fb9.zip
Added vertices UI List to Geometry view
-rwxr-xr-x__init__.py1
-rwxr-xr-xviews/get_vertices.py6
-rwxr-xr-xviews/mainpanel/meshing_tools/blockmesh.py10
-rwxr-xr-xviews/mainpanel/view.py54
4 files changed, 38 insertions, 33 deletions
diff --git a/__init__.py b/__init__.py
index 09bc8d0..854b95b 100755
--- a/__init__.py
+++ b/__init__.py
@@ -125,6 +125,7 @@ classes = (
VNT_global_properties_collection,
VNT_UL_mesh_file_manager,
VNT_UL_mesh_file_coroner,
+ CUSTOM_UL_verts,
CUSTOM_UL_blocks,
CUSTOM_UL_faces,
CUSTOM_UL_edges_Main,
diff --git a/views/get_vertices.py b/views/get_vertices.py
index 2b21b62..18efe36 100755
--- a/views/get_vertices.py
+++ b/views/get_vertices.py
@@ -5,7 +5,7 @@ class get_vertices:
def draw(self, ptr, context):
cs = context.scene
spt = ptr.column().split()
- spt.ui_units_y = 0.75
+ spt.ui_units_y = 1.25
c1 = spt.row(align=True)
c1.scale_y = 1.25
c2 = spt.column(align=True).split(align=True)
@@ -31,7 +31,7 @@ class get_vertices:
text=None,
).select_all = False
- c2.scale_y = 1.25
+ c2.scale_y = 1.4
c2.alert = True
c2.operator(VNT_OT_vertactions.bl_idname, icon="REMOVE", text=None).action = (
"REMOVE"
@@ -40,7 +40,7 @@ class get_vertices:
c2.alert = False
row = ptr.row()
- row.scale_y = 1.2
+ row.scale_y = 1.4
row.template_list(
"CUSTOM_UL_verts", "", cs, "vcustom", cs, "vcustom_index", rows=2
)
diff --git a/views/mainpanel/meshing_tools/blockmesh.py b/views/mainpanel/meshing_tools/blockmesh.py
index 0c5383e..d7ece18 100755
--- a/views/mainpanel/meshing_tools/blockmesh.py
+++ b/views/mainpanel/meshing_tools/blockmesh.py
@@ -89,8 +89,6 @@ class blockmesh_menu:
r5c2c1.prop(cs, "cell_z", toggle=True)
r5c2c2.prop(cs, "ctm", slider=True)
-
- getattr(get_vertices(), "draw")(tools, context)
row6 = tools.row()
row6.scale_y = 1.3
@@ -128,8 +126,12 @@ class blockmesh_menu:
row6bb2.operator(VNT_OT_remove_blocks.bl_idname, icon="CANCEL", text="")
row6bb2.operator(VNT_OT_remove_all_blocks.bl_idname, icon="TRASH", text="")
row6bb2.operator(VNT_OT_clearblocks.bl_idname, icon="TRASH", text="")
-
-
+
+ row7 = tools.row()
+ row7.scale_y = 1.4
+ row7.template_list("CUSTOM_UL_blocks", "", cs, "bcustom", cs, "bcustom_index", rows=2)
+
+ getattr(get_vertices(), "draw")(tools, context)
class VNT_PT_cell_location(Panel):
diff --git a/views/mainpanel/view.py b/views/mainpanel/view.py
index e45aede..a3660ad 100755
--- a/views/mainpanel/view.py
+++ b/views/mainpanel/view.py
@@ -91,40 +91,42 @@ class layout_controller:
else:
getattr(snappyhexmesh_menu(), "layout")(tools, context)
- projects = layout.box()
- r7 = projects.row()
+
+ # THis feature is to be implemented later down the line
+ # projects = layout.box()
+ # r7 = projects.row()
# This shabby piece of code is similar to the draw method of top navigation bar, but relatively better.
# This creates a horizontal tabs list of active projects (cases) dynamically.
- for i in range(0, len(cs.mfile_item)):
- x = r7.column(align=True).row(align=True)
+ # for i in range(0, len(cs.mfile_item)):
+ # x = r7.column(align=True).row(align=True)
- x.operator("VNT_OT_active_project_indicator",
- text=cs.mfile_item[i].ITEM_name,
- emboss = True if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier else False).active_file_id = cs.mfile_item[i].ITEM_identifier
+ # x.operator("VNT_OT_active_project_indicator",
+ # text=cs.mfile_item[i].ITEM_name,
+ # emboss = True if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier else False).active_file_id = cs.mfile_item[i].ITEM_identifier
- x.operator("vnt.deactivate_mesh_file_item",
- text="",
- emboss = True if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier else False,
- icon="PANEL_CLOSE").dump_file_id = cs.mfile_item[i].ITEM_identifier
+ # x.operator("vnt.deactivate_mesh_file_item",
+ # text="",
+ # emboss = True if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier else False,
+ # icon="PANEL_CLOSE").dump_file_id = cs.mfile_item[i].ITEM_identifier
- x.scale_y = 1.7 if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier else 1.9
- x.scale_x = 0.9730 + len(cs.mfile_item)*(0.009 if len(cs.mfile_item) == 3 else 0.01) if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier else 1.0
+ # x.scale_y = 1.7 if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier else 1.9
+ # x.scale_x = 0.9730 + len(cs.mfile_item)*(0.009 if len(cs.mfile_item) == 3 else 0.01) if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier else 1.0
- r7.ui_units_y = 0.00001
+ # r7.ui_units_y = 0.00001
- r8 = projects.row(align=True)
- for i in range(0, len(cs.mfile_item)):
- y = r8.column(align=True)
- if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier:
- y.label(text="") # Active tab in the view
- else:
- y.scale_y = 0.8
- y.box().label(text="") # Passive tabs in the view
-
- r10 = projects.row()
- r10.scale_y = 1.4
- r10.template_list("CUSTOM_UL_blocks", "", cs, "bcustom", cs, "bcustom_index", rows=2)
+ # r8 = projects.row(align=True)
+ # for i in range(0, len(cs.mfile_item)):
+ # y = r8.column(align=True)
+ # if cs.mfile_item[i].ITEM_identifier == cs.mfile_item[cs.mfile_item_index].ITEM_identifier:
+ # y.label(text="") # Active tab in the view
+ # else:
+ # y.scale_y = 0.8
+ # y.box().label(text="") # Passive tabs in the view
+
+ # r10 = projects.row()
+ # r10.scale_y = 1.4
+ # r10.template_list("CUSTOM_UL_blocks", "", cs, "bcustom", cs, "bcustom_index", rows=2)
def VNT_ST_visualize(self, layout, context):
outline = layout.box()