Add geometry nodes asset and validation script

- Implemented a new geometry nodes asset in `build_geometry_nodes_asset.py` to handle mesh refinement and topology fixing.
- Created a validation script in `validate_geometry_nodes_asset.py` to ensure the integrity and functionality of the geometry node group.
- Added input handling for various parameters including resolution, iterations, and smoothing options.
- Included checks for node group structure and attributes to validate the geometry processing pipeline.
This commit is contained in:
2026-08-11 13:23:13 +08:00
parent fc27c23fd1
commit 07d836d9ad
15 changed files with 2408 additions and 68 deletions

View File

@@ -1783,22 +1783,37 @@ class ConvertImageToDepthPlane(bpy.types.Operator):
return {"FINISHED"}
class SnapFormImageMenu(bpy.types.Menu):
bl_idname = "SNAPFORM_MT_image_context"
bl_label = "SnapForm"
def draw(self, _context):
layout = self.layout
layout.operator_context = "INVOKE_DEFAULT"
layout.operator(
"snapform.convert_image_to_depth_plane",
text="Convert to Depth Plane",
icon="MOD_DISPLACE",
)
layout.operator(
"snapform.convert_image_to_mesh",
text="Convert to Mesh",
icon="MESH_GRID",
)
layout.separator()
layout.operator(
"snapform.remove_image_background",
text="Remove Background",
icon="IMAGE_ALPHA",
)
def draw_image_context_menu(self, context):
active_object = context.object
if not is_image_empty(active_object):
if not is_image_empty(context.object):
return
self.layout.separator()
row = self.layout.row()
row.operator_context = "INVOKE_DEFAULT"
row.operator(
"snapform.convert_image_to_depth_plane",
text="Convert to Depth Plane",
icon="MOD_DISPLACE",
)
row = self.layout.row()
row.operator_context = "INVOKE_DEFAULT"
row.operator(
"snapform.remove_image_background",
text="Remove Background",
icon="IMAGE_ALPHA",
self.layout.menu(
SnapFormImageMenu.bl_idname,
text="SnapForm",
icon="PLUGIN",
)