Created
January 23, 2023 15:45
-
-
Save SuddenDevelopment/23213e9ba094578c3e03a187dcda0e37 to your computer and use it in GitHub Desktop.
Blender bulk apply scale, location and separate by loose parts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| for obj in bpy.context.scene.objects: | |
| if obj.type == 'MESH': | |
| obj.select_set(True) | |
| try: | |
| bpy.context.view_layer.objects.active = obj | |
| bpy.ops.mesh.separate(type='LOOSE') | |
| bpy.ops.object.transform_apply(location=False, rotation=True, scale=True) | |
| except: | |
| pass | |
| obj.select_set(False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment