21 lines
742 B
Python
21 lines
742 B
Python
#!/usr/bin/env python3
|
|
import pathlib
|
|
import sys
|
|
import bpy
|
|
|
|
def main(output: pathlib.Path) -> None:
|
|
bpy.ops.wm.read_factory_settings(use_empty=True)
|
|
world = bpy.data.worlds.new("WebGapWorld")
|
|
world.color = (0.12, 0.2, 0.35)
|
|
world.use_fake_user = True
|
|
world.mist_settings.use_mist = True
|
|
world.mist_settings.start = 3.0
|
|
world.mist_settings.depth = 18.0
|
|
world.mist_settings.intensity = 0.4
|
|
bpy.ops.wm.save_as_mainfile(filepath=str(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 --python M16-GAP-00029.py -- OUTPUT")
|
|
main(pathlib.Path(arguments[0]))
|