player animations and blender export
This commit is contained in:
@@ -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.
BIN
blender/player_mesh.blend.pre_split_backup
Normal file
BIN
blender/player_mesh.blend.pre_split_backup
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user