Govern task context and advance execution pointer
This commit is contained in:
29
tools/web/generated/M16-GAP-00042.py
Normal file
29
tools/web/generated/M16-GAP-00042.py
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
|
||||
from modifier_gap_fixture import create_mesh_object
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
arguments = sys.argv[sys.argv.index("--") + 1:]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --python M16-GAP-00042.py -- OUTPUT")
|
||||
output = pathlib.Path(arguments[0])
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
obj = create_mesh_object("WebGapDisplaceObject")
|
||||
modifier = obj.modifiers.new(name="WebGapDisplace", type="DISPLACE")
|
||||
modifier.direction = "Z"
|
||||
modifier.strength = 0.75
|
||||
modifier.mid_level = 0.25
|
||||
modifier.texture_coords = "GLOBAL"
|
||||
modifier.show_viewport = True
|
||||
modifier.show_render = True
|
||||
modifier.show_in_editmode = False
|
||||
modifier.show_on_cage = False
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
obj.select_set(True)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(output.resolve()), check_existing=False, compress=True)
|
||||
Reference in New Issue
Block a user