blender python export script for every simple mob
This commit is contained in:
parent
3c7d2eb94b
commit
2562b33ee9
@ -24,7 +24,7 @@ to make the model textures clearer in blender check the upper left menu bar - fi
|
||||
## Exporting with Blender python scripting
|
||||
- Exporting is complex and best be scripted
|
||||
- the scripts are inside /models/extra/blender-scripting/
|
||||
- there are more instructions inside /models/extra/blender-scripting/agent.sh
|
||||
- there are more instructions inside /models/extra/blender-scripting/blender-export-agent.sh
|
||||
|
||||
## Exporting 180 degress rotated
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
models/bat.blend
BIN
models/bat.blend
Binary file not shown.
BIN
models/bee.blend
BIN
models/bee.blend
Binary file not shown.
Binary file not shown.
BIN
models/cat.blend
BIN
models/cat.blend
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
models/cod.blend
BIN
models/cod.blend
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
blender=$HOME/blender-2.79b-linux-glibc219-x86_64/blender
|
||||
|
||||
# exports agent 180 degress rotated
|
||||
$blender ../../agent.blend --python $PWD/lib/agent.py
|
||||
|
||||
# move b3d into exported folder
|
||||
# move all b3d files into exported folder
|
||||
mv ../../*.b3d $PWD/exported/
|
||||
|
||||
|
||||
echo done everything
|
85
models/extra/blender-scripting/blender-export.sh
Executable file
85
models/extra/blender-scripting/blender-export.sh
Executable file
@ -0,0 +1,85 @@
|
||||
#!/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 everything selected and 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
|
||||
|
||||
# exports agent 180 degress rotated
|
||||
$blender ../../agent.blend --python $PWD/lib/agent.py
|
||||
$blender ../../axolotl.blend --python $PWD/lib/axolotl.py
|
||||
$blender ../../bat.blend --python $PWD/lib/bat.py
|
||||
$blender ../../bee.blend --python $PWD/lib/bee.py
|
||||
$blender ../../blaze.blend --python $PWD/lib/blaze.py
|
||||
$blender ../../cat_baby.blend --python $PWD/lib/cat_baby.py
|
||||
$blender ../../cat.blend --python $PWD/lib/cat.py
|
||||
$blender ../../chicken_baby.blend --python $PWD/lib/chicken_baby.py
|
||||
$blender ../../chicken.blend --python $PWD/lib/chicken.py
|
||||
$blender ../../cod.blend --python $PWD/lib/cod.py
|
||||
$blender ../../creeper.blend --python $PWD/lib/creeper.py
|
||||
$blender ../../dolphin.blend --python $PWD/lib/dolphin.py
|
||||
$blender ../../enderdragon.blend --python $PWD/lib/enderdragon.py
|
||||
$blender ../../endermite.blend --python $PWD/lib/endermite.py
|
||||
$blender ../../fox.blend --python $PWD/lib/fox.py
|
||||
$blender ../../ghast.blend --python $PWD/lib/ghast.py
|
||||
$blender ../../goat.blend --python $PWD/lib/goat.py
|
||||
$blender ../../guardian+guardian_elder.blend --python $PWD/lib/guardian+guardian_elder.py
|
||||
$blender ../../hoglin+zoglin.blend --python $PWD/lib/hoglin+zoglin.py
|
||||
$blender ../../iron_golem.blend --python $PWD/lib/iron_golem.py
|
||||
$blender ../../magmacube.blend --python $PWD/lib/magmacube.py
|
||||
$blender ../../panda.blend --python $PWD/lib/panda.py
|
||||
$blender ../../parrot.blend --python $PWD/lib/parrot.py
|
||||
$blender ../../phantom.blend --python $PWD/lib/phantom.py
|
||||
$blender ../../polarbear_baby.blend --python $PWD/lib/polarbear_baby.py
|
||||
$blender ../../polarbear.blend --python $PWD/lib/polarbear.py
|
||||
$blender ../../rabbit_baby.blend --python $PWD/lib/rabbit_baby.py
|
||||
$blender ../../rabbit.blend --python $PWD/lib/rabbit.py
|
||||
$blender ../../ravager.blend --python $PWD/lib/ravager.py
|
||||
$blender ../../salmon.blend --python $PWD/lib/salmon.py
|
||||
$blender ../../shulker.blend --python $PWD/lib/shulker.py
|
||||
$blender ../../silverfish.blend --python $PWD/lib/silverfish.py
|
||||
$blender ../../slime.blend --python $PWD/lib/slime.py
|
||||
$blender ../../spider.blend --python $PWD/lib/spider.py
|
||||
$blender ../../squid.blend --python $PWD/lib/squid.py
|
||||
$blender ../../strider.blend --python $PWD/lib/strider.py
|
||||
$blender ../../tropical.fish.a.blend --python $PWD/lib/tropical.fish.a.py
|
||||
$blender ../../tropical.fish.b.blend --python $PWD/lib/tropical.fish.b.py
|
||||
$blender ../../turtle.blend --python $PWD/lib/turtle.py
|
||||
$blender ../../villager_zombie_baby.blend --python $PWD/lib/villager_zombie_baby.py
|
||||
$blender ../../villager_zombie.blend --python $PWD/lib/villager_zombie.py
|
||||
$blender ../../witch.blend --python $PWD/lib/witch.py
|
||||
$blender ../../wither.blend --python $PWD/lib/wither.py
|
||||
$blender ../../wolf_baby.blend --python $PWD/lib/wolf_baby.py
|
||||
$blender ../../wolf.blend --python $PWD/lib/wolf.py
|
||||
$blender ../../zombie_baby.blend --python $PWD/lib/zombie_baby.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
|
||||
mv --force ../../*.b3d $PWD/exported/
|
||||
|
||||
echo done everything
|
Binary file not shown.
BIN
models/extra/blender-scripting/exported/axolotl.b3d
Normal file
BIN
models/extra/blender-scripting/exported/axolotl.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/bat.b3d
Normal file
BIN
models/extra/blender-scripting/exported/bat.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/bee.b3d
Normal file
BIN
models/extra/blender-scripting/exported/bee.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/blaze.b3d
Normal file
BIN
models/extra/blender-scripting/exported/blaze.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/cat.b3d
Normal file
BIN
models/extra/blender-scripting/exported/cat.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/cat_baby.b3d
Normal file
BIN
models/extra/blender-scripting/exported/cat_baby.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/chicken.b3d
Normal file
BIN
models/extra/blender-scripting/exported/chicken.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/chicken_baby.b3d
Normal file
BIN
models/extra/blender-scripting/exported/chicken_baby.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/cod.b3d
Normal file
BIN
models/extra/blender-scripting/exported/cod.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/creeper.b3d
Normal file
BIN
models/extra/blender-scripting/exported/creeper.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/dolphin.b3d
Normal file
BIN
models/extra/blender-scripting/exported/dolphin.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/enderdragon.b3d
Normal file
BIN
models/extra/blender-scripting/exported/enderdragon.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/endermite.b3d
Normal file
BIN
models/extra/blender-scripting/exported/endermite.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/fox.b3d
Normal file
BIN
models/extra/blender-scripting/exported/fox.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/ghast.b3d
Normal file
BIN
models/extra/blender-scripting/exported/ghast.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/goat.b3d
Normal file
BIN
models/extra/blender-scripting/exported/goat.b3d
Normal file
Binary file not shown.
Binary file not shown.
BIN
models/extra/blender-scripting/exported/hoglin+zoglin.b3d
Normal file
BIN
models/extra/blender-scripting/exported/hoglin+zoglin.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/iron_golem.b3d
Normal file
BIN
models/extra/blender-scripting/exported/iron_golem.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/magmacube.b3d
Normal file
BIN
models/extra/blender-scripting/exported/magmacube.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/panda.b3d
Normal file
BIN
models/extra/blender-scripting/exported/panda.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/parrot.b3d
Normal file
BIN
models/extra/blender-scripting/exported/parrot.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/phantom.b3d
Normal file
BIN
models/extra/blender-scripting/exported/phantom.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/polarbear.b3d
Normal file
BIN
models/extra/blender-scripting/exported/polarbear.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/polarbear_baby.b3d
Normal file
BIN
models/extra/blender-scripting/exported/polarbear_baby.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/rabbit.b3d
Normal file
BIN
models/extra/blender-scripting/exported/rabbit.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/rabbit_baby.b3d
Normal file
BIN
models/extra/blender-scripting/exported/rabbit_baby.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/ravager.b3d
Normal file
BIN
models/extra/blender-scripting/exported/ravager.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/salmon.b3d
Normal file
BIN
models/extra/blender-scripting/exported/salmon.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/shulker.b3d
Normal file
BIN
models/extra/blender-scripting/exported/shulker.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/silverfish.b3d
Normal file
BIN
models/extra/blender-scripting/exported/silverfish.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/slime.b3d
Normal file
BIN
models/extra/blender-scripting/exported/slime.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/spider.b3d
Normal file
BIN
models/extra/blender-scripting/exported/spider.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/squid.b3d
Normal file
BIN
models/extra/blender-scripting/exported/squid.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/strider.b3d
Normal file
BIN
models/extra/blender-scripting/exported/strider.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/tropical.fish.a.b3d
Normal file
BIN
models/extra/blender-scripting/exported/tropical.fish.a.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/tropical.fish.b.b3d
Normal file
BIN
models/extra/blender-scripting/exported/tropical.fish.b.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/turtle.b3d
Normal file
BIN
models/extra/blender-scripting/exported/turtle.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/villager_zombie.b3d
Normal file
BIN
models/extra/blender-scripting/exported/villager_zombie.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/villager_zombie_baby.b3d
Normal file
BIN
models/extra/blender-scripting/exported/villager_zombie_baby.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/witch.b3d
Normal file
BIN
models/extra/blender-scripting/exported/witch.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/wither.b3d
Normal file
BIN
models/extra/blender-scripting/exported/wither.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/wolf.b3d
Normal file
BIN
models/extra/blender-scripting/exported/wolf.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/wolf_baby.b3d
Normal file
BIN
models/extra/blender-scripting/exported/wolf_baby.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/zombie.b3d
Normal file
BIN
models/extra/blender-scripting/exported/zombie.b3d
Normal file
Binary file not shown.
BIN
models/extra/blender-scripting/exported/zombie_baby.b3d
Normal file
BIN
models/extra/blender-scripting/exported/zombie_baby.b3d
Normal file
Binary file not shown.
38
models/extra/blender-scripting/lib/axolotl.py
Normal file
38
models/extra/blender-scripting/lib/axolotl.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'axolotl.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/bat.py
Normal file
38
models/extra/blender-scripting/lib/bat.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'bat.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/bee.py
Normal file
38
models/extra/blender-scripting/lib/bee.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'bee.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/blaze.py
Normal file
38
models/extra/blender-scripting/lib/blaze.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'blaze.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/cat.py
Normal file
38
models/extra/blender-scripting/lib/cat.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'cat.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/cat_baby.py
Normal file
38
models/extra/blender-scripting/lib/cat_baby.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'cat_baby.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/chicken.py
Normal file
38
models/extra/blender-scripting/lib/chicken.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'chicken.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/chicken_baby.py
Normal file
38
models/extra/blender-scripting/lib/chicken_baby.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'chicken_baby.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/cod.py
Normal file
38
models/extra/blender-scripting/lib/cod.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'cod.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/creeper.py
Normal file
38
models/extra/blender-scripting/lib/creeper.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'creeper.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/dolphin.py
Normal file
38
models/extra/blender-scripting/lib/dolphin.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'dolphin.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/enderdragon.py
Normal file
38
models/extra/blender-scripting/lib/enderdragon.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'enderdragon.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/endermite.py
Normal file
38
models/extra/blender-scripting/lib/endermite.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'endermite.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/fox.py
Normal file
38
models/extra/blender-scripting/lib/fox.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'fox.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/ghast.py
Normal file
38
models/extra/blender-scripting/lib/ghast.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'ghast.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/goat.py
Normal file
38
models/extra/blender-scripting/lib/goat.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'goat.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'guardian+guardian_elder.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/hoglin+zoglin.py
Normal file
38
models/extra/blender-scripting/lib/hoglin+zoglin.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'hoglin+zoglin.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/iron_golem.py
Normal file
38
models/extra/blender-scripting/lib/iron_golem.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'iron_golem.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/magmacube.py
Normal file
38
models/extra/blender-scripting/lib/magmacube.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'magmacube.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/panda.py
Normal file
38
models/extra/blender-scripting/lib/panda.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'panda.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/parrot.py
Normal file
38
models/extra/blender-scripting/lib/parrot.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'parrot.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/phantom.py
Normal file
38
models/extra/blender-scripting/lib/phantom.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'phantom.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/polarbear.py
Normal file
38
models/extra/blender-scripting/lib/polarbear.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'polarbear.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/polarbear_baby.py
Normal file
38
models/extra/blender-scripting/lib/polarbear_baby.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'polarbear_baby.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/rabbit.py
Normal file
38
models/extra/blender-scripting/lib/rabbit.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'rabbit.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/rabbit_baby.py
Normal file
38
models/extra/blender-scripting/lib/rabbit_baby.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'rabbit_baby.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/ravager.py
Normal file
38
models/extra/blender-scripting/lib/ravager.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'ravager.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/salmon.py
Normal file
38
models/extra/blender-scripting/lib/salmon.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'salmon.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/shulker.py
Normal file
38
models/extra/blender-scripting/lib/shulker.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'shulker.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/silverfish.py
Normal file
38
models/extra/blender-scripting/lib/silverfish.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'silverfish.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/slime.py
Normal file
38
models/extra/blender-scripting/lib/slime.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'slime.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/spider.py
Normal file
38
models/extra/blender-scripting/lib/spider.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'spider.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/squid.py
Normal file
38
models/extra/blender-scripting/lib/squid.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'squid.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/strider.py
Normal file
38
models/extra/blender-scripting/lib/strider.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'strider.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
38
models/extra/blender-scripting/lib/tropical.fish.a.py
Normal file
38
models/extra/blender-scripting/lib/tropical.fish.a.py
Normal file
@ -0,0 +1,38 @@
|
||||
import bpy
|
||||
import os
|
||||
|
||||
# join them together ctrl+j
|
||||
bpy.ops.object.join()
|
||||
|
||||
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, 'tropical.fish.a.b3d')
|
||||
|
||||
#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()
|
||||
|
||||
# exits blender
|
||||
bpy.ops.wm.quit_blender()
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user