Created
January 17, 2019 21:52
-
-
Save jedStevens/4aaca6c025c25bd7bec493c09ba34252 to your computer and use it in GitHub Desktop.
This file contains 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 | |
import os | |
basedir = bpy.path.abspath('//shadefoot/story_mode/ch1/trees/maple/') | |
bpy.ops.object.select_all(action='DESELECT') | |
scene = bpy.context.scene | |
for obj in scene.objects: | |
scene.objects.active = obj | |
obj.select = True | |
for child in obj.children: | |
child.select = True | |
if obj.type == 'CURVE': | |
bpy.ops.export_scene.obj(filepath = os.path.join(basedir, obj.name + ".obj"), use_selection = True) | |
for child in obj.children: | |
child.select = False | |
obj.select = False | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment