feat: allow exporting object in virtools file which has geometry.

- allow exporting object without apply modifier.
- allow exporting any objects which can be mesh (has geometry).
- due to this change, add virtools mesh properties for metaball, font, curve, surface.
- due to this change, remove the virtools group warning for metaball, font, curve and surface.
This commit is contained in:
2026-03-05 21:45:36 +08:00
parent 68fbffad54
commit 8a7e3306a7
4 changed files with 86 additions and 42 deletions

View File

@@ -1,6 +1,6 @@
import bpy
import typing, enum
from . import UTIL_functions, UTIL_icons_manager
from . import UTIL_functions, UTIL_icons_manager, UTIL_blender_mesh
#region Virtools Groups Define & Help Class
@@ -387,9 +387,9 @@ class BBP_PT_virtools_groups(bpy.types.Panel):
target = typing.cast(bpy.types.Object, context.active_object)
# notify on non-mesh object
if target.type != 'MESH':
if not UTIL_blender_mesh.TemporaryMesh.has_geometry(target):
layout.label(
text='Virtools Group is invalid on non-mesh object!', icon='ERROR',
text='Virtools Group is invalid on non-mesh-like object!', icon='ERROR',
text_ctxt='BBP_PT_virtools_groups/draw')
# draw main body