Some blender export testing
This commit is contained in:
parent
e878aa4db6
commit
7a92887c5e
BIN
assets/blender/test_level_blend/NurbsPath.glb
(Stored with Git LFS)
BIN
assets/blender/test_level_blend/NurbsPath.glb
(Stored with Git LFS)
Binary file not shown.
BIN
assets/blender/test_level_blend/Plane.glb
(Stored with Git LFS)
BIN
assets/blender/test_level_blend/Plane.glb
(Stored with Git LFS)
Binary file not shown.
BIN
assets/blender/testblend_blend/Bakery.glb
(Stored with Git LFS)
BIN
assets/blender/testblend_blend/Bakery.glb
(Stored with Git LFS)
Binary file not shown.
BIN
assets/blender/testblend_blend/Fire_Station.glb
(Stored with Git LFS)
BIN
assets/blender/testblend_blend/Fire_Station.glb
(Stored with Git LFS)
Binary file not shown.
BIN
assets/blender/testblend_blend/Gas_Station_Shop.glb
(Stored with Git LFS)
BIN
assets/blender/testblend_blend/Gas_Station_Shop.glb
(Stored with Git LFS)
Binary file not shown.
BIN
assets/blender/testblend_blend/Green_House.glb
(Stored with Git LFS)
BIN
assets/blender/testblend_blend/Green_House.glb
(Stored with Git LFS)
Binary file not shown.
BIN
assets/blender/testblend_blend/Hotel.glb
(Stored with Git LFS)
BIN
assets/blender/testblend_blend/Hotel.glb
(Stored with Git LFS)
Binary file not shown.
@ -70,7 +70,11 @@ def export_object_as_glb(obj: bpy.types.Object, export_path: str):
|
|||||||
assert bpy.context.view_layer is not None
|
assert bpy.context.view_layer is not None
|
||||||
bpy.context.view_layer.objects.active = obj
|
bpy.context.view_layer.objects.active = obj
|
||||||
|
|
||||||
|
if obj.type == 'CURVE':
|
||||||
|
bpy.ops.object.convert(target='MESH', keep_original=True)
|
||||||
|
|
||||||
bpy.ops.export_scene.gltf(filepath=full_export_path, use_selection=True, export_apply=True)
|
bpy.ops.export_scene.gltf(filepath=full_export_path, use_selection=True, export_apply=True)
|
||||||
|
bpy.ops.object.delete()
|
||||||
|
|
||||||
print(f"Exported {obj.name} -> {export_path}")
|
print(f"Exported {obj.name} -> {export_path}")
|
||||||
|
|
||||||
|
BIN
src_assets/test_level.blend
(Stored with Git LFS)
BIN
src_assets/test_level.blend
(Stored with Git LFS)
Binary file not shown.
BIN
src_assets/test_level.blend1
(Stored with Git LFS)
BIN
src_assets/test_level.blend1
(Stored with Git LFS)
Binary file not shown.
BIN
src_assets/tools.blend
(Stored with Git LFS)
BIN
src_assets/tools.blend
(Stored with Git LFS)
Binary file not shown.
BIN
src_assets/tools.blend1
(Stored with Git LFS)
BIN
src_assets/tools.blend1
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user