Last active
August 29, 2015 14:26
-
-
Save EnsekiTT/280c1a0aa808f8a907e3 to your computer and use it in GitHub Desktop.
Blenderで全てスクリプトから生成するときに毎回オブジェクトが蓄積しないようにする
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
| #!BPY | |
| import bpy | |
| def clear_all(): | |
| for item in bpy.context.scene.objects: | |
| bpy.context.scene.objects.unlink(item) | |
| for item in bpy.data.objects: | |
| bpy.data.objects.remove(item) | |
| for item in bpy.data.meshes: | |
| bpy.data.meshes.remove(item) | |
| for item in bpy.data.materials: | |
| bpy.data.materials.remove(item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment