blender python export script for every complex mob
This commit is contained in:
parent
2562b33ee9
commit
fadd154076
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,62 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["mooshroom1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="mooshroom*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["cow_body"]
|
||||||
|
|
||||||
|
# select everything
|
||||||
|
bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["cow_body"]
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'cow.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'cow+mooshroom.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,62 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["mooshroom1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="mooshroom*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["cow_body"]
|
||||||
|
|
||||||
|
# select everything
|
||||||
|
bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["cow_body"]
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'cow_baby.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'cow+mooshroom.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,94 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["baby_overlay_head.overlay.1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="baby_overlay_head.overlay*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["drowned_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="drowned*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["overlay_body.overlay.1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="overlay*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["trident_handle"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="trident*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'drowned.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'drowned.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,82 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["45flower_front"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="45flower*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["90flower_front"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="90flower*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["end_body3"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="end_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'enderman.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'enderman.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,82 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["chest_left"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="chest_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["mule_body1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="mule_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["saddle_top"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="saddle_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'horse_baby.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'horse+zombiehorse+skeltonhorse+mule+donkey_baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,58 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["mule_neck1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="mule_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'horse_baby.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'horse+zombiehorse+skeltonhorse+mule+donkey_baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,86 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_iro*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_iro*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_bo*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["evo_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="evo_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["hat_head1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="hat_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'illusioner_mc.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'vindicator+evoker+illusioner+villager+baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,86 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_iro*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_iro*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_bo*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["evo_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="evo_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["hat_head1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="hat_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'illusioner_pp.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'vindicator+evoker+illusioner+villager+baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,82 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["chest_left"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="chest_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["deco_body1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="deco_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["llama_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="llama_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'llama.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'llama.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,82 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["chest_left"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="chest_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["deco_body1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="deco_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["llama_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="llama_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'llama_baby.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'llama_baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,84 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["mooshroom1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="mooshroom*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
# sets object named body to active object there can only be one
|
||||||
|
#bpy.context.scene.objects.active = bpy.data.objects["cow_head"]
|
||||||
|
#bpy.context.scene.objects.active = bpy.data.objects["cow_body"]
|
||||||
|
|
||||||
|
#bpy.data.objects['body'].select_set(True)
|
||||||
|
#bpy.data.objects['head'].select_set(True)
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_by_type
|
||||||
|
#Select all visible objects that are of a type
|
||||||
|
#bpy.ops.object.select_by_type(extend=False, type='MESH')
|
||||||
|
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='INVERT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["cow_head"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="cow*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'mooshroom.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'cow+mooshroom.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,84 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["mooshroom1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="mooshroom*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
# sets object named body to active object there can only be one
|
||||||
|
#bpy.context.scene.objects.active = bpy.data.objects["cow_head"]
|
||||||
|
#bpy.context.scene.objects.active = bpy.data.objects["cow_body"]
|
||||||
|
|
||||||
|
#bpy.data.objects['body'].select_set(True)
|
||||||
|
#bpy.data.objects['head'].select_set(True)
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_by_type
|
||||||
|
#Select all visible objects that are of a type
|
||||||
|
#bpy.ops.object.select_by_type(extend=False, type='MESH')
|
||||||
|
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='INVERT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["cow_head"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="cow*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'mooshroom_baby.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'cow+mooshroom.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,85 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
#bpy.context.scene.objects.active = bpy.data.objects["horse.body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
#bpy.ops.object.select_pattern(pattern="horse_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
#bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
#bpy.context.scene.objects.active = bpy.data.objects["deco_body1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
#bpy.ops.object.select_pattern(pattern="deco_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
#bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
#bpy.context.scene.objects.active = bpy.data.objects["llama_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
#bpy.ops.object.select_pattern(pattern="llama_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
#bpy.ops.object.join()
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["horse.body"]
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'new_horse.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'new_horse.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,82 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["baby_head"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="baby_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["pig_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="pig_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["saddle1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="saddle*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'pig.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'pig.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,74 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["ipp_gold.sword"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_gold.sw*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["pig_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="pig_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'piglin_mc.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'piglin.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,74 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_gold.sword"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_gold.sw*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["pig_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="pig_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'piglin_pp.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'piglin.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,82 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["1puf_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="1puf_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["2puf_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="2puf_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["3puf_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="3puf_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'puffer.fish.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'puffer.fish.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,70 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["fur.body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="fur.*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["sheep.body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="sheep.*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'sheep.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'sheep.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,70 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["fur.body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="fur.*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["sheep.body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="sheep.*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'sheep_baby.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'sheep_baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,86 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["stray_head2"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="stray_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["ipp_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_stone*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_stone*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["skely_body3"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="skely_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'skeleton_mc.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'skeleton+skeleton_stray+wither_skeleton.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,86 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["stray_head2"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="stray_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_stone*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_stone*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["skely_body3"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="skely_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'skeleton_pp.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'skeleton+skeleton_stray+wither_skeleton.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,88 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["ipp_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_st*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_stone*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["skely_body3"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="skely_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["stray_body1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="stray_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'skeleton_stray_mc.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'skeleton+skeleton_stray+wither_skeleton.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,88 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["ipp_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_st*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_stone*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["skely_body3"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="skely_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["stray_body1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="stray_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'skeleton_stray_pp.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'skeleton+skeleton_stray+wither_skeleton.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,62 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["snow_legs"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="snow_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'snowman.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'snowman.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,74 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["ipp_iron.sword"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_iron*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["vex_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="vex_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'vex_mc.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'vex.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,74 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_iron.sword"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_iron*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["vex_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="vex_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'vex_pp.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'vex.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,87 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_iron*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_iron*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["evo_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="evo_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["hat_head1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="hat_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'villager.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'vindicator+evoker+illusioner+villager+baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,86 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_iron*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["evo_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="evo_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["hat_head1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="hat_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'vindicator_mc.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'vindicator+evoker+illusioner+villager+baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,86 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_iron*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["evo_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="evo_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["hat_head1"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="hat_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'vindicator_pp.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'vindicator+evoker+illusioner+villager+baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,86 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["stray_head2"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="stray_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_stone*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["skely_body3"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="skely_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'wither_skeleton_mc.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'skeleton+skeleton_stray+wither_skeleton.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,86 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["stray_head2"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="stray_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_bow"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_bo*", case_sensitive=False, extend=True)
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_stone*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["skely_body3"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="skely_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'wither_skeleton_pp.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'skeleton+skeleton_stray+wither_skeleton.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,72 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_gold.sword"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="ipp_gold*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["pig_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="pig_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'zombie_pigman_mc.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'zombie_pigman+baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -0,0 +1,72 @@
|
||||||
|
import bpy
|
||||||
|
import os
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["imc_gold.sword"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="imc_gold*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# delete selected
|
||||||
|
bpy.ops.object.delete(use_global=False)
|
||||||
|
|
||||||
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
|
#put object as active
|
||||||
|
bpy.context.scene.objects.active = bpy.data.objects["pig_body"]
|
||||||
|
|
||||||
|
#https://docs.blender.org/api/2.79b/bpy.ops.object.html?highlight=object#bpy.ops.object.select_pattern
|
||||||
|
#Select objects matching a naming pattern
|
||||||
|
bpy.ops.object.select_pattern(pattern="pig_*", case_sensitive=False, extend=True)
|
||||||
|
|
||||||
|
# join them together ctrl+j
|
||||||
|
bpy.ops.object.join()
|
||||||
|
|
||||||
|
#bpy.ops.object.select_all(action='TOGGLE')
|
||||||
|
bpy.ops.object.select_all(action='SELECT')
|
||||||
|
|
||||||
|
# ctrl+shift+alt+c set origin to 3d cursor
|
||||||
|
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
|
||||||
|
|
||||||
|
|
||||||
|
def get_override(area_type, region_type):
|
||||||
|
for area in bpy.context.screen.areas:
|
||||||
|
if area.type == area_type:
|
||||||
|
for region in area.regions:
|
||||||
|
if region.type == region_type:
|
||||||
|
override = {'area': area, 'region': region}
|
||||||
|
return override
|
||||||
|
#error message if the area or region wasn't found
|
||||||
|
raise RuntimeError("Wasn't able to find", region_type," in area ", area_type,
|
||||||
|
"\n Make sure it's open while executing script.")
|
||||||
|
|
||||||
|
|
||||||
|
#we need to override the context of our operator
|
||||||
|
override = get_override( 'VIEW_3D', 'WINDOW' )
|
||||||
|
#rotate about the X-axis by 45 degrees
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
bpy.ops.transform.rotate(override, axis=(0,0,1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
blend_file_path = bpy.data.filepath
|
||||||
|
directory = os.path.dirname(blend_file_path)
|
||||||
|
#target_file = os.path.join(directory, 'agent.obj')
|
||||||
|
#target_file = os.path.join(directory, 'exported/agent.b3d')
|
||||||
|
target_file = os.path.join(directory, 'zombie_pigman_pp.b3d')
|
||||||
|
target_file_new = os.path.join(directory, 'zombie_pigman+baby.blend1')
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj(filepath=target_file)
|
||||||
|
bpy.ops.screen.b3d_export(filepath=target_file)
|
||||||
|
|
||||||
|
#bpy.ops.export_scene.obj()
|
||||||
|
#bpy.ops.screen.b3d_export()
|
||||||
|
|
||||||
|
#save as for testing
|
||||||
|
bpy.ops.wm.save_as_mainfile(filepath=target_file_new)
|
||||||
|
|
||||||
|
# exits blender
|
||||||
|
bpy.ops.wm.quit_blender()
|
|
@ -58,27 +58,6 @@ $blender ../../wolf.blend --python $PWD/lib/wolf.py
|
||||||
$blender ../../zombie_baby.blend --python $PWD/lib/zombie_baby.py
|
$blender ../../zombie_baby.blend --python $PWD/lib/zombie_baby.py
|
||||||
$blender ../../zombie.blend --python $PWD/lib/zombie.py
|
$blender ../../zombie.blend --python $PWD/lib/zombie.py
|
||||||
|
|
||||||
# SPECIAL CASES
|
|
||||||
# cow + mooshroom_baby
|
|
||||||
# cow + mooshroom
|
|
||||||
# drowned
|
|
||||||
# enderman
|
|
||||||
# horse + zombiehorse + skeltonhorse + mule + donkey baby
|
|
||||||
# horse + zombiehorse + skeltonhorse + mule + donkey
|
|
||||||
# llama_baby
|
|
||||||
# llama
|
|
||||||
# new_horse
|
|
||||||
# pig
|
|
||||||
# piglin
|
|
||||||
# puffer.fish
|
|
||||||
# sheep_baby
|
|
||||||
# sheep
|
|
||||||
# skeleton + skeleton_stray + wither_skeleton
|
|
||||||
# snowman
|
|
||||||
# vex
|
|
||||||
# vindicator + evoker + illusioner + villager + baby
|
|
||||||
# zombie_pigman + baby
|
|
||||||
|
|
||||||
# move all b3d files into exported folder
|
# move all b3d files into exported folder
|
||||||
mv --force ../../*.b3d $PWD/exported/
|
mv --force ../../*.b3d $PWD/exported/
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# https://www.youtube.com/watch?v=KNa5kJd2Epo
|
||||||
|
|
||||||
|
# https://www.blender.org/download/previous-versions/
|
||||||
|
# path to your blender2.97b executable
|
||||||
|
# mine is in my home folder
|
||||||
|
# make sure you have b3d exporter installed and enabled on that version
|
||||||
|
# every blend file needs to have shift+c (3d cursor in the middle on the floor) and inside Default tab for this to work properly
|
||||||
|
blender=$HOME/blender-2.79b-linux-glibc219-x86_64/blender
|
||||||
|
|
||||||
|
|
||||||
|
$blender ../../cow+mooshroom.blend --python $PWD/+/cow.py
|
||||||
|
$blender ../../cow+mooshroom.blend --python $PWD/+/mooshroom.py
|
||||||
|
$blender ../../cow+mooshroom_baby.blend --python $PWD/+/cow_baby.py
|
||||||
|
$blender ../../cow+mooshroom_baby.blend --python $PWD/+/mooshroom_baby.py
|
||||||
|
$blender ../../drowned.blend --python $PWD/+/drowned.py
|
||||||
|
$blender ../../enderman.blend --python $PWD/+/enderman.py
|
||||||
|
$blender ../../horse+zombiehorse+skeltonhorse+mule+donkey.blend --python $PWD/+/horse.py
|
||||||
|
$blender ../../horse+zombiehorse+skeltonhorse+mule+donkey_baby.blend --python $PWD/+/horse_baby.py
|
||||||
|
$blender ../../llama_baby.blend --python $PWD/+/llama_baby.py
|
||||||
|
$blender ../../llama.blend --python $PWD/+/llama.py
|
||||||
|
$blender ../../new_horse.blend --python $PWD/+/new_horse.py
|
||||||
|
$blender ../../pig.blend --python $PWD/+/pig.py
|
||||||
|
$blender ../../piglin.blend --python $PWD/+/piglin_mc.py
|
||||||
|
$blender ../../piglin.blend --python $PWD/+/piglin_pp.py
|
||||||
|
$blender ../../puffer.fish.blend --python $PWD/+/puffer.fish.py
|
||||||
|
$blender ../../sheep_baby.blend --python $PWD/+/sheep_baby.py
|
||||||
|
$blender ../../sheep.blend --python $PWD/+/sheep.py
|
||||||
|
$blender ../../skeleton+skeleton_stray+wither_skeleton.blend --python $PWD/+/skeleton_mc.py
|
||||||
|
$blender ../../skeleton+skeleton_stray+wither_skeleton.blend --python $PWD/+/skeleton_pp.py
|
||||||
|
$blender ../../skeleton+skeleton_stray+wither_skeleton.blend --python $PWD/+/wither_skeleton_pp.py
|
||||||
|
$blender ../../skeleton+skeleton_stray+wither_skeleton.blend --python $PWD/+/wither_skeleton_mc.py
|
||||||
|
$blender ../../skeleton+skeleton_stray+wither_skeleton.blend --python $PWD/+/skeleton_stray_mc.py
|
||||||
|
$blender ../../skeleton+skeleton_stray+wither_skeleton.blend --python $PWD/+/skeleton_stray_pp.py
|
||||||
|
$blender ../../snowman.blend --python $PWD/+/snowman.py
|
||||||
|
$blender ../../vex.blend --python $PWD/+/vex_pp.py
|
||||||
|
$blender ../../vex.blend --python $PWD/+/vex_mc.py
|
||||||
|
$blender ../../vindicator+evoker+illusioner+villager+baby.blend --python $PWD/+/villager.py
|
||||||
|
$blender ../../vindicator+evoker+illusioner+villager+baby.blend --python $PWD/+/vindicator_mc.py
|
||||||
|
$blender ../../vindicator+evoker+illusioner+villager+baby.blend --python $PWD/+/vindicator_pp.py
|
||||||
|
$blender ../../vindicator+evoker+illusioner+villager+baby.blend --python $PWD/+/illusioner_pp.py
|
||||||
|
$blender ../../vindicator+evoker+illusioner+villager+baby.blend --python $PWD/+/illusioner_mc.py
|
||||||
|
$blender ../../zombie_pigman+baby.blend --python $PWD/+/zombie_pigman_mc.py
|
||||||
|
$blender ../../zombie_pigman+baby.blend --python $PWD/+/zombie_pigman_pp.py
|
||||||
|
|
||||||
|
# new_horse NEEDS FIX
|
||||||
|
|
||||||
|
# move all b3d files into exported folder
|
||||||
|
mv --force ../../*.b3d $PWD/special.exported/
|
||||||
|
|
||||||
|
echo done everything
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
models/pig.blend
BIN
models/pig.blend
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
models/vex.blend
BIN
models/vex.blend
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue