https://blender.stackexchange.com/a/269344/89484
was a great idea, so I created an add-on.
This will make it easier to unwrap while checking the UVs.
bl_info = {
"name": "Add Seam Attribute",
"blender": (2, 80, 0),
"category": "Object",
"author": "KSYN",
"description": "Add or update the 'seam' attribute for selected mesh objects",
"location": "View3D > UV Mapping",
"warning": "",
"doc_url": "https://blender.stackexchange.com/questions/269330/how-to-get-seams-as-an-edge-property-in-geometry-nodes",
"support": "COMMUNITY",
"version": (1, 0, 0),
"blenderapi": (3, 6, 0),
"update_check": False,
"category": "Mesh",
}
import bpy
class AddSeamOperator(bpy.types.Operator):
bl_idname = "object.add_seam_operator"
bl_label = "Add Seam Attribute"
bl_description = "Add or update the 'seam' attribute for selected mesh objects"
def execute(self, context):
def add_seam_attr(attributes):
return attributes.new(name='seam', type='BOOLEAN', domain='EDGE')
bpy.ops.object.mode_set(mode='OBJECT')
obj = bpy.context.object
if obj.type == 'MESH':
mesh = obj.data
seam = mesh.attributes.get('seam')
if seam:
if seam.data_type != 'BOOLEAN' or seam.domain != 'EDGE':
mesh.attributes.remove(seam)
seam = add_seam_attr(mesh.attributes)
else:
seam = add_seam_attr(mesh.attributes)
seam.data.foreach_set('value', [e.use_seam for e in mesh.edges])
mesh.update()
bpy.ops.object.mode_set(mode='EDIT')
return {'FINISHED'}
def menu_func(self, context):
self.layout.operator(AddSeamOperator.bl_idname)
def register():
bpy.utils.register_class(AddSeamOperator)
bpy.types.VIEW3D_MT_uv_map.append(menu_func)
def unregister():
bpy.utils.unregister_class(AddSeamOperator)
bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
if __name__ == "__main__":
register()
Further improved version
Completely original attributes can be added to edges, vertices and noodles.
2024-04-13 I decided to manage this in GIT for study purposes because of the long character count.
https://github.com/Hydrocallis/AddAttribute
https://github.com/Hydrocallis/AddAttribute/wiki