player animations and blender export

This commit is contained in:
Jonas H
2026-07-10 08:17:40 +02:00
parent 69bf70060c
commit b1d9f96068
7 changed files with 717 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ class SNOWTRAIL_OT_export_gltf(bpy.types.Operator):
props = context.scene.snow_trail_export
bpy.ops.export_scene.gltf(
gltf_kwargs = dict(
filepath=str(export_path),
export_format='GLTF_SEPARATE',
use_selection=True,
@@ -66,11 +66,22 @@ class SNOWTRAIL_OT_export_gltf(bpy.types.Operator):
export_yup=True,
export_texcoords=True,
export_normals=True,
export_colors=props.export_vertex_colors,
export_vertex_color='ACTIVE' if props.export_vertex_colors else 'NONE',
export_materials='NONE' if not props.export_materials else 'EXPORT',
export_animations=props.export_animations,
)
if props.export_animations:
gltf_kwargs.update(
export_animation_mode='NLA_TRACKS',
export_anim_slide_to_zero=True,
export_optimize_animation_size=False,
export_force_sampling=True,
export_nla_strips=False,
)
bpy.ops.export_scene.gltf(**gltf_kwargs)
rel_path = export_path.relative_to(find_project_root())
self.report({'INFO'}, f"Exported → {rel_path}")
return {'FINISHED'}

Binary file not shown.

Binary file not shown.

Binary file not shown.