28 lines
919 B
Python
28 lines
919 B
Python
#!/usr/bin/env python3
|
|
import pathlib
|
|
import sys
|
|
|
|
import bpy
|
|
|
|
|
|
def main(output):
|
|
bpy.ops.wm.read_factory_settings(use_empty=True)
|
|
scene = bpy.context.scene
|
|
scene.name = "WBV2P2005WorkflowScene"
|
|
bpy.ops.mesh.primitive_cube_add(size=2, location=(0, 0, 0))
|
|
cube = bpy.context.object
|
|
cube.name = "WBV2P2005WorkflowCube"
|
|
cube.data.name = "WBV2P2005WorkflowCubeMesh"
|
|
cube.select_set(True)
|
|
bpy.context.view_layer.objects.active = cube
|
|
scene.world = bpy.data.worlds.new("WBV2P2005WorkflowWorld")
|
|
scene.world.color = (0.055, 0.065, 0.08)
|
|
bpy.ops.wm.save_as_mainfile(filepath=str(pathlib.Path(output).resolve()), check_existing=False, compress=True)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
|
if len(arguments) != 1:
|
|
raise SystemExit("usage: blender -b --factory-startup --python WBV2-P2-005.py -- OUTPUT")
|
|
main(arguments[0])
|