MikolajZ commited on
Commit
2edc208
·
1 Parent(s): b03cd78

Added blender files

Browse files
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
60
  *.ply filter=lfs diff=lfs merge=lfs -text
 
 
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
60
  *.ply filter=lfs diff=lfs merge=lfs -text
61
+ *.blend filter=lfs diff=lfs merge=lfs -text
blender/ficus/Ficus.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:546b0adfbfb2d94cdd8ad7caf4a71fa2b4c54001761f5e2f2dfb992c10e672fe
3
+ size 51576607
blender/ficus/script.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/ficus/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = bpy.context.scene.frame_start
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_names = ["ficus_main", "mask_ficus1_910k"]
17
+ for i in range(1, 561):
18
+ if i == 12:
19
+ continue
20
+ object_names.append(f"mask_ficus1_910k.{i:03d}")
21
+
22
+ # Deselect everything
23
+ bpy.ops.object.select_all(action='DESELECT')
24
+
25
+ # Ensure it is selected and active
26
+ for name in object_names:
27
+ obj = bpy.data.objects[name]
28
+ obj.select_set(True)
29
+ bpy.context.view_layer.objects.active = obj
30
+
31
+ # Loop through each frame
32
+ for frame in range(start_frame, end_frame + 1):
33
+ bpy.context.scene.frame_set(frame)
34
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
35
+
36
+ # Export to .obj
37
+ filename = f"{(frame - 1):05d}.ply"
38
+ filepath = os.path.join(output_dir, filename)
39
+
40
+ bpy.ops.wm.ply_export(
41
+ filepath=filepath,
42
+ apply_modifiers=True,
43
+ export_selected_objects=True,
44
+ export_normals=True,
45
+ export_uv=True,
46
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
47
+ export_attributes=False,
48
+ export_triangulated_mesh=False,
49
+ ascii_format=True, # Set to False for binary PLY
50
+ forward_axis='Y',
51
+ up_axis='Z'
52
+ )
53
+
54
+ print(f"Exported frame {frame} to {filepath}")
blender/garden/Garden.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:195c5bfc9335987f17a7c084924c963f3083e3ae8981e2fa837b2572f368bc7c
3
+ size 46512998
blender/garden/script.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/garden/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = bpy.context.scene.frame_start
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_name = "step-000019999_means"
17
+
18
+ # Deselect everything
19
+ bpy.ops.object.select_all(action='DESELECT')
20
+
21
+ # Get the object
22
+ obj = bpy.data.objects[object_name]
23
+
24
+ # Ensure it is selected and active
25
+ obj.select_set(True)
26
+ bpy.context.view_layer.objects.active = obj
27
+
28
+ # Loop through each frame
29
+ for frame in range(start_frame, end_frame + 1):
30
+ bpy.context.scene.frame_set(frame)
31
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
32
+
33
+ # Export to .obj
34
+ filename = f"{(frame - 1):05d}.ply"
35
+ filepath = os.path.join(output_dir, filename)
36
+
37
+ bpy.ops.wm.ply_export(
38
+ filepath=filepath,
39
+ apply_modifiers=True,
40
+ export_selected_objects=True,
41
+ export_normals=True,
42
+ export_uv=True,
43
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
44
+ export_attributes=False,
45
+ export_triangulated_mesh=False,
46
+ ascii_format=True, # Set to False for binary PLY
47
+ global_scale=0.1,
48
+ forward_axis='Y',
49
+ up_axis='Z'
50
+ )
51
+
52
+ print(f"Exported frame {frame} to {filepath}")
blender/hotdog/Hotdog.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:640bb7aa457e983a615136311fef6bd348dadb0bc85e26e92b1d2404ce535986
3
+ size 66898069
blender/hotdog/script.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/hotdog/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = bpy.context.scene.frame_start
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_name = "mask_hotdog1_1m"
17
+
18
+ # Deselect everything
19
+ bpy.ops.object.select_all(action='DESELECT')
20
+
21
+ # Get the object
22
+ obj = bpy.data.objects[object_name]
23
+
24
+ # Ensure it is selected and active
25
+ obj.select_set(True)
26
+ bpy.context.view_layer.objects.active = obj
27
+
28
+ # Loop through each frame
29
+ for frame in range(start_frame, end_frame + 1):
30
+ bpy.context.scene.frame_set(frame)
31
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
32
+
33
+ # Export to .obj
34
+ filename = f"{(frame - 1):05d}.ply"
35
+ filepath = os.path.join(output_dir, filename)
36
+
37
+ bpy.ops.wm.ply_export(
38
+ filepath=filepath,
39
+ apply_modifiers=True,
40
+ export_selected_objects=True,
41
+ export_normals=True,
42
+ export_uv=True,
43
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
44
+ export_attributes=False,
45
+ export_triangulated_mesh=False,
46
+ ascii_format=True, # Set to False for binary PLY
47
+ forward_axis='Y',
48
+ up_axis='Z'
49
+ )
50
+
51
+ print(f"Exported frame {frame} to {filepath}")
blender/kitchen/Kitchen.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7742399f7b1bba911dd7a70836e08a8ff32b82c521968cb72e1c74b2fab1808
3
+ size 46474286
blender/kitchen/script.py ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/kitchen/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = bpy.context.scene.frame_start
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_name = "step-000019999_means"
17
+
18
+ # Deselect everything
19
+ bpy.ops.object.select_all(action='DESELECT')
20
+
21
+ # Get the object
22
+ obj = bpy.data.objects[object_name]
23
+
24
+ # Ensure it is selected and active
25
+ obj.select_set(True)
26
+ bpy.context.view_layer.objects.active = obj
27
+
28
+ # Loop through each frame
29
+ for frame in range(start_frame, end_frame + 1):
30
+ bpy.context.scene.frame_set(frame)
31
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
32
+
33
+ # Export to .obj
34
+ filename = f"{(frame - 1):05d}.ply"
35
+ filepath = os.path.join(output_dir, filename)
36
+
37
+ bpy.ops.wm.ply_export(
38
+ filepath=filepath,
39
+ apply_modifiers=True,
40
+ export_selected_objects=True,
41
+ export_normals=True,
42
+ export_uv=True,
43
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
44
+ export_attributes=False,
45
+ export_triangulated_mesh=False,
46
+ ascii_format=True, # Set to False for binary PLY
47
+ global_scale=0.1,
48
+ forward_axis='Y',
49
+ up_axis='Z'
50
+ )
51
+
52
+ print(f"Exported frame {frame} to {filepath}")
blender/lego_move_scoop/Lego_move.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:816330a70cf65e1172b128cd5c339f8c7c9b9cef575aa28a935ca1b2d4b69c31
3
+ size 112102368
blender/lego_move_scoop/script.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/lego_move_scoop/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = bpy.context.scene.frame_start
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_name = "mask_lego1_900k"
17
+
18
+ # Deselect everything
19
+ bpy.ops.object.select_all(action='DESELECT')
20
+
21
+ # Get the object
22
+ obj = bpy.data.objects[object_name]
23
+
24
+ # Ensure it is selected and active
25
+ obj.select_set(True)
26
+ bpy.context.view_layer.objects.active = obj
27
+
28
+ # Loop through each frame
29
+ for frame in range(start_frame, end_frame + 1):
30
+ bpy.context.scene.frame_set(frame)
31
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
32
+
33
+ # Export to .obj
34
+ filename = f"{(frame - 1):05d}.ply"
35
+ filepath = os.path.join(output_dir, filename)
36
+
37
+ bpy.ops.wm.ply_export(
38
+ filepath=filepath,
39
+ apply_modifiers=True,
40
+ export_selected_objects=True,
41
+ export_normals=True,
42
+ export_uv=True,
43
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
44
+ export_attributes=False,
45
+ export_triangulated_mesh=False,
46
+ ascii_format=True, # Set to False for binary PLY
47
+ forward_axis='Y',
48
+ up_axis='Z'
49
+ )
50
+
51
+ print(f"Exported frame {frame} to {filepath}")
blender/lego_soft/Lego_soft.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:497b950fe7135b135e687c1621bde871594773fa523ef7b6d29aeafb52d0233c
3
+ size 134631879
blender/lego_soft/script.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/lego_soft/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = bpy.context.scene.frame_start
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_name = "Lego_2"
17
+
18
+ # Deselect everything
19
+ bpy.ops.object.select_all(action='DESELECT')
20
+
21
+ # Get the object
22
+ obj = bpy.data.objects[object_name]
23
+
24
+ # Ensure it is selected and active
25
+ obj.select_set(True)
26
+ bpy.context.view_layer.objects.active = obj
27
+
28
+ # Loop through each frame
29
+ for frame in range(start_frame, end_frame + 1):
30
+ bpy.context.scene.frame_set(frame)
31
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
32
+
33
+ # Export to .obj
34
+ filename = f"{(frame - 1):05d}.ply"
35
+ filepath = os.path.join(output_dir, filename)
36
+
37
+ bpy.ops.wm.ply_export(
38
+ filepath=filepath,
39
+ apply_modifiers=True,
40
+ export_selected_objects=True,
41
+ export_normals=True,
42
+ export_uv=True,
43
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
44
+ export_attributes=False,
45
+ export_triangulated_mesh=False,
46
+ ascii_format=True, # Set to False for binary PLY
47
+ forward_axis='Y',
48
+ up_axis='Z'
49
+ )
50
+
51
+ print(f"Exported frame {frame} to {filepath}")
blender/materials/Materials.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a7cd72b4c5b3b633a7e7d036c9164ad832c0e4b4f39f459ca2c5412b176272a
3
+ size 90931589
blender/materials/script.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/materials/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = 1
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_names = ["materials", "materials.001", "materials.002", "materials.003", "materials.004", "materials.005", "materials.006", "materials.007", "materials.008", "materials.009", "materials.010", "materials.011"]
17
+
18
+ # Deselect everything
19
+ bpy.ops.object.select_all(action='DESELECT')
20
+
21
+ # Ensure it is selected and active
22
+ for name in object_names:
23
+ obj = bpy.data.objects[name]
24
+ obj.select_set(True)
25
+ bpy.context.view_layer.objects.active = obj
26
+
27
+ # Loop through each frame
28
+ for frame in range(start_frame, end_frame + 1):
29
+ bpy.context.scene.frame_set(frame)
30
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
31
+
32
+ # Export to .obj
33
+ filename = f"{(frame - 1):05d}.ply"
34
+ filepath = os.path.join(output_dir, filename)
35
+
36
+ bpy.ops.wm.ply_export(
37
+ filepath=filepath,
38
+ apply_modifiers=True,
39
+ export_selected_objects=True,
40
+ export_normals=True,
41
+ export_uv=True,
42
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
43
+ export_attributes=False,
44
+ export_triangulated_mesh=False,
45
+ ascii_format=True, # Set to False for binary PLY
46
+ forward_axis='Y',
47
+ up_axis='Z'
48
+ )
49
+
50
+ print(f"Exported frame {frame} to {filepath}")
blender/pillow_duck/Pillow_duck.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:adfb651ec1dc360b421f6378f48cdaba7bcf7387e956dac38cc175740f4729a8
3
+ size 31048971
blender/pillow_duck/script.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/pillow_duck/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = 1
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_names = ["Pillow", "Sphere"]
17
+
18
+ # Deselect everything
19
+ bpy.ops.object.select_all(action='DESELECT')
20
+
21
+ # Ensure it is selected and active
22
+ for name in object_names:
23
+ obj = bpy.data.objects[name]
24
+ obj.select_set(True)
25
+ bpy.context.view_layer.objects.active = obj
26
+
27
+ # Loop through each frame
28
+ for frame in range(start_frame, end_frame + 1):
29
+ bpy.context.scene.frame_set(frame)
30
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
31
+
32
+ # Export to .obj
33
+ filename = f"{(frame - 1):05d}.ply"
34
+ filepath = os.path.join(output_dir, filename)
35
+
36
+ bpy.ops.wm.ply_export(
37
+ filepath=filepath,
38
+ apply_modifiers=True,
39
+ export_selected_objects=True,
40
+ export_normals=True,
41
+ export_uv=True,
42
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
43
+ export_attributes=False,
44
+ export_triangulated_mesh=False,
45
+ ascii_format=True, # Set to False for binary PLY
46
+ forward_axis='Y',
47
+ up_axis='Z'
48
+ )
49
+
50
+ print(f"Exported frame {frame} to {filepath}")
blender/pirate_flag/Pirate_flag.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:337df394929043ce0b5e100b95ba1997e8261d0c7793dfc0ebc9cb193e8ad325
3
+ size 12276935
blender/pirate_flag/script.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/pirate_flag/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = 1
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_names = ["Flag", "Plane"]
17
+
18
+ # Deselect everything
19
+ bpy.ops.object.select_all(action='DESELECT')
20
+
21
+ # Ensure it is selected and active
22
+ for name in object_names:
23
+ obj = bpy.data.objects[name]
24
+ obj.select_set(True)
25
+ bpy.context.view_layer.objects.active = obj
26
+
27
+ # Loop through each frame
28
+ for frame in range(start_frame, end_frame + 1):
29
+ bpy.context.scene.frame_set(frame)
30
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
31
+
32
+ # Export to .obj
33
+ filename = f"{(frame - 1):05d}.ply"
34
+ filepath = os.path.join(output_dir, filename)
35
+
36
+ bpy.ops.wm.ply_export(
37
+ filepath=filepath,
38
+ apply_modifiers=True,
39
+ export_selected_objects=True,
40
+ export_normals=True,
41
+ export_uv=True,
42
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
43
+ export_attributes=False,
44
+ export_triangulated_mesh=False,
45
+ ascii_format=True, # Set to False for binary PLY
46
+ forward_axis='Y',
47
+ up_axis='Z'
48
+ )
49
+
50
+ print(f"Exported frame {frame} to {filepath}")
blender/ship/Ship.blend ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d00f2939c86d50d0f83b07e106ddb428c135c6ce2348690e9c40fa88a33ab49a
3
+ size 191574453
blender/ship/script.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import bpy
2
+ import os
3
+
4
+ # Set output directory
5
+ output_dir = "blender/ship/plys" # Change this!
6
+
7
+ # Ensure the output directory exists
8
+ if not os.path.exists(output_dir):
9
+ os.makedirs(output_dir)
10
+
11
+ # Set the frame range
12
+ start_frame = 1
13
+ end_frame = bpy.context.scene.frame_end
14
+
15
+ # Name of the object to export
16
+ object_names = ["ship"]
17
+
18
+ # Deselect everything
19
+ bpy.ops.object.select_all(action='DESELECT')
20
+
21
+ # Ensure it is selected and active
22
+ for name in object_names:
23
+ obj = bpy.data.objects[name]
24
+ obj.select_set(True)
25
+ bpy.context.view_layer.objects.active = obj
26
+
27
+ # Loop through each frame
28
+ for frame in range(start_frame, end_frame + 1):
29
+ bpy.context.scene.frame_set(frame)
30
+ bpy.context.view_layer.update() # Ensure simulation is evaluated
31
+
32
+ # Export to .obj
33
+ filename = f"{(frame - 1):05d}.ply"
34
+ filepath = os.path.join(output_dir, filename)
35
+
36
+ bpy.ops.wm.ply_export(
37
+ filepath=filepath,
38
+ apply_modifiers=True,
39
+ export_selected_objects=True,
40
+ export_normals=True,
41
+ export_uv=True,
42
+ export_colors='NONE', # options: 'NONE', 'SRGB', 'LINEAR'
43
+ export_attributes=False,
44
+ export_triangulated_mesh=False,
45
+ ascii_format=True, # Set to False for binary PLY
46
+ forward_axis='Y',
47
+ up_axis='Z'
48
+ )
49
+
50
+ print(f"Exported frame {frame} to {filepath}")