Complete M16 asset operator parity chain
This commit is contained in:
27
tools/web/generated/M16-GAP-00264.py
Normal file
27
tools/web/generated/M16-GAP-00264.py
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
IMAGE_NAME = "WebGapAssetDownloadImage"
|
||||
IMAGE_PATH = "//assets/WebGapAssetDownload.png"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00264.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
image = bpy.data.images.new(IMAGE_NAME, width=1, height=1, alpha=True)
|
||||
image.filepath = IMAGE_PATH
|
||||
image.source = "FILE"
|
||||
image.use_fake_user = True
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
27
tools/web/generated/M16-GAP-00265.py
Normal file
27
tools/web/generated/M16-GAP-00265.py
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
IMAGE_NAME = "WebGapAssetsDownloadImage"
|
||||
IMAGE_PATH = "//assets/WebGapAssetsDownload.png"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00265.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
image = bpy.data.images.new(IMAGE_NAME, width=1, height=1, alpha=True)
|
||||
image.filepath = IMAGE_PATH
|
||||
image.source = "FILE"
|
||||
image.use_fake_user = True
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
34
tools/web/generated/M16-GAP-00266.py
Normal file
34
tools/web/generated/M16-GAP-00266.py
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
ACTION_NAME = "WebGapAssignAction"
|
||||
OBJECT_NAME = "WebGapAssignActionObject"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00266.py -- OUTPUT")
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, None)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
for frame, x in ((1, 0.0), (5, 2.0)):
|
||||
obj.location.x = x
|
||||
obj.keyframe_insert(data_path="location", index=0, frame=frame)
|
||||
action = obj.animation_data.action
|
||||
action.name = ACTION_NAME
|
||||
action.use_fake_user = True
|
||||
bpy.context.scene.frame_start = 1
|
||||
bpy.context.scene.frame_end = 5
|
||||
bpy.context.scene.frame_set(1)
|
||||
bpy.ops.wm.save_as_mainfile(
|
||||
filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
50
tools/web/generated/M16-GAP-00267.py
Normal file
50
tools/web/generated/M16-GAP-00267.py
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
LIBRARY_NAME = "WebGapBrowseContaining.blend"
|
||||
OBJECT_NAME = "WebGapBrowseContainingObject"
|
||||
|
||||
|
||||
def reset():
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
|
||||
|
||||
def create_source(path):
|
||||
reset()
|
||||
mesh = bpy.data.meshes.new("WebGapBrowseContainingMesh")
|
||||
mesh.from_pydata([(-1.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)], [], [(0, 1, 2)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(path), check_existing=False, compress=True)
|
||||
|
||||
|
||||
def create_fixture(output):
|
||||
source = output.with_name(LIBRARY_NAME)
|
||||
create_source(source)
|
||||
reset()
|
||||
with bpy.data.libraries.load(str(source), link=True) as (data_from, data_to):
|
||||
if OBJECT_NAME not in data_from.objects:
|
||||
raise RuntimeError("browse-containing source object is missing")
|
||||
data_to.objects = [OBJECT_NAME]
|
||||
linked = data_to.objects[0]
|
||||
if linked is None:
|
||||
raise RuntimeError("browse-containing linked object is missing")
|
||||
bpy.context.scene.collection.objects.link(linked)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(output), check_existing=False, compress=True)
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00267.py -- OUTPUT")
|
||||
output = pathlib.Path(arguments[0]).resolve()
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
create_fixture(output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
50
tools/web/generated/M16-GAP-00268.py
Normal file
50
tools/web/generated/M16-GAP-00268.py
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
LIBRARY_NAME = "WebGapBundleInstall.blend"
|
||||
OBJECT_NAME = "WebGapBundleInstallObject"
|
||||
|
||||
|
||||
def reset():
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
|
||||
|
||||
def create_source(path):
|
||||
reset()
|
||||
mesh = bpy.data.meshes.new("WebGapBundleInstallMesh")
|
||||
mesh.from_pydata([(-1.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)], [], [(0, 1, 2)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(path), check_existing=False, compress=True)
|
||||
|
||||
|
||||
def create_fixture(output):
|
||||
source = output.with_name(LIBRARY_NAME)
|
||||
create_source(source)
|
||||
reset()
|
||||
with bpy.data.libraries.load(str(source), link=True) as (data_from, data_to):
|
||||
if OBJECT_NAME not in data_from.objects:
|
||||
raise RuntimeError("bundle-install source object is missing")
|
||||
data_to.objects = [OBJECT_NAME]
|
||||
linked = data_to.objects[0]
|
||||
if linked is None:
|
||||
raise RuntimeError("bundle-install linked object is missing")
|
||||
bpy.context.scene.collection.objects.link(linked)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(output), check_existing=False, compress=True)
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00268.py -- OUTPUT")
|
||||
output = pathlib.Path(arguments[0]).resolve()
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
create_fixture(output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
46
tools/web/generated/M16-GAP-00269.py
Normal file
46
tools/web/generated/M16-GAP-00269.py
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
LIBRARY_NAME = "WebGapCatalogDelete.blend"
|
||||
OBJECT_NAME = "WebGapCatalogDeleteObject"
|
||||
|
||||
|
||||
def reset():
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
|
||||
|
||||
def create_fixture(output):
|
||||
source = output.with_name(LIBRARY_NAME)
|
||||
reset()
|
||||
mesh = bpy.data.meshes.new("WebGapCatalogDeleteMesh")
|
||||
mesh.from_pydata([(-1.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)], [], [(0, 1, 2)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(source), check_existing=False, compress=True)
|
||||
reset()
|
||||
with bpy.data.libraries.load(str(source), link=True) as (data_from, data_to):
|
||||
if OBJECT_NAME not in data_from.objects:
|
||||
raise RuntimeError("catalog-delete source object is missing")
|
||||
data_to.objects = [OBJECT_NAME]
|
||||
linked = data_to.objects[0]
|
||||
if linked is None:
|
||||
raise RuntimeError("catalog-delete linked object is missing")
|
||||
bpy.context.scene.collection.objects.link(linked)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(output), check_existing=False, compress=True)
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00269.py -- OUTPUT")
|
||||
output = pathlib.Path(arguments[0]).resolve()
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
create_fixture(output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
37
tools/web/generated/M16-GAP-00270.py
Normal file
37
tools/web/generated/M16-GAP-00270.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
LIBRARY_NAME = "WebGapCatalogNew.blend"
|
||||
OBJECT_NAME = "WebGapCatalogNewObject"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00270.py -- OUTPUT")
|
||||
output = pathlib.Path(arguments[0]).resolve()
|
||||
source = output.with_name(LIBRARY_NAME)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapCatalogNewMesh")
|
||||
mesh.from_pydata([(-1.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)], [], [(0, 1, 2)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(source), check_existing=False, compress=True)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
with bpy.data.libraries.load(str(source), link=True) as (data_from, data_to):
|
||||
if OBJECT_NAME not in data_from.objects:
|
||||
raise RuntimeError("catalog-new source object is missing")
|
||||
data_to.objects = [OBJECT_NAME]
|
||||
linked = data_to.objects[0]
|
||||
if linked is None:
|
||||
raise RuntimeError("catalog-new linked object is missing")
|
||||
bpy.context.scene.collection.objects.link(linked)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(output), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
20
tools/web/generated/M16-GAP-00271.py
Normal file
20
tools/web/generated/M16-GAP-00271.py
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib, sys, bpy
|
||||
|
||||
LIBRARY_NAME = "WebGapCatalogRedo.blend"
|
||||
OBJECT_NAME = "WebGapCatalogRedoObject"
|
||||
|
||||
def main():
|
||||
args = sys.argv[sys.argv.index("--") + 1:]
|
||||
if len(args) != 1: raise SystemExit("usage")
|
||||
output = pathlib.Path(args[0]).resolve(); source = output.with_name(LIBRARY_NAME)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapCatalogRedoMesh"); mesh.from_pydata([(-1,0,0),(1,0,0),(0,1,0)], [], [(0,1,2)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh); bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(source), check_existing=False, compress=True)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
with bpy.data.libraries.load(str(source), link=True) as (data_from, data_to): data_to.objects = [OBJECT_NAME]
|
||||
bpy.context.scene.collection.objects.link(data_to.objects[0])
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(output), check_existing=False, compress=True)
|
||||
|
||||
if __name__ == "__main__": main()
|
||||
11
tools/web/generated/M16-GAP-00272.py
Normal file
11
tools/web/generated/M16-GAP-00272.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib, sys, bpy
|
||||
LIBRARY_NAME="WebGapCatalogUndo.blend"; OBJECT_NAME="WebGapCatalogUndoObject"
|
||||
def main():
|
||||
args=sys.argv[sys.argv.index("--")+1:]
|
||||
if len(args)!=1: raise SystemExit("usage")
|
||||
output=pathlib.Path(args[0]).resolve(); source=output.with_name(LIBRARY_NAME); bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh=bpy.data.meshes.new("WebGapCatalogUndoMesh"); mesh.from_pydata([(-1,0,0),(1,0,0),(0,1,0)],[],[(0,1,2)]); obj=bpy.data.objects.new(OBJECT_NAME,mesh); bpy.context.scene.collection.objects.link(obj); bpy.ops.wm.save_as_mainfile(filepath=str(source),check_existing=False,compress=True); bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
with bpy.data.libraries.load(str(source),link=True) as (data_from,data_to): data_to.objects=[OBJECT_NAME]
|
||||
bpy.context.scene.collection.objects.link(data_to.objects[0]); bpy.ops.wm.save_as_mainfile(filepath=str(output),check_existing=False,compress=True)
|
||||
if __name__=="__main__": main()
|
||||
11
tools/web/generated/M16-GAP-00273.py
Normal file
11
tools/web/generated/M16-GAP-00273.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib, sys, bpy
|
||||
LIBRARY_NAME="WebGapCatalogUndoPush.blend"; OBJECT_NAME="WebGapCatalogUndoPushObject"
|
||||
def main():
|
||||
args=sys.argv[sys.argv.index("--")+1:]
|
||||
if len(args)!=1: raise SystemExit("usage")
|
||||
output=pathlib.Path(args[0]).resolve(); source=output.with_name(LIBRARY_NAME); bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh=bpy.data.meshes.new("WebGapCatalogUndoPushMesh"); mesh.from_pydata([(-1,0,0),(1,0,0),(0,1,0)],[],[(0,1,2)]); obj=bpy.data.objects.new(OBJECT_NAME,mesh); bpy.context.scene.collection.objects.link(obj); bpy.ops.wm.save_as_mainfile(filepath=str(source),check_existing=False,compress=True); bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
with bpy.data.libraries.load(str(source),link=True) as (data_from,data_to): data_to.objects=[OBJECT_NAME]
|
||||
bpy.context.scene.collection.objects.link(data_to.objects[0]); bpy.ops.wm.save_as_mainfile(filepath=str(output),check_existing=False,compress=True)
|
||||
if __name__=="__main__": main()
|
||||
37
tools/web/generated/M16-GAP-00274.py
Normal file
37
tools/web/generated/M16-GAP-00274.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
LIBRARY_NAME = "WebGapCatalogsSave.blend"
|
||||
OBJECT_NAME = "WebGapCatalogsSaveObject"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00274.py -- OUTPUT")
|
||||
output = pathlib.Path(arguments[0]).resolve()
|
||||
source = output.with_name(LIBRARY_NAME)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapCatalogsSaveMesh")
|
||||
mesh.from_pydata([(-1.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)], [], [(0, 1, 2)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(source), check_existing=False, compress=True)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
with bpy.data.libraries.load(str(source), link=True) as (data_from, data_to):
|
||||
if OBJECT_NAME not in data_from.objects:
|
||||
raise RuntimeError("catalogs-save source object is missing")
|
||||
data_to.objects = [OBJECT_NAME]
|
||||
linked = data_to.objects[0]
|
||||
if linked is None:
|
||||
raise RuntimeError("catalogs-save linked object is missing")
|
||||
bpy.context.scene.collection.objects.link(linked)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(output), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
37
tools/web/generated/M16-GAP-00275.py
Normal file
37
tools/web/generated/M16-GAP-00275.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
LIBRARY_NAME = "WebGapAssetClear.blend"
|
||||
OBJECT_NAME = "WebGapAssetClearObject"
|
||||
|
||||
|
||||
def main():
|
||||
arguments = sys.argv[sys.argv.index("--") + 1 :]
|
||||
if len(arguments) != 1:
|
||||
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00275.py -- OUTPUT")
|
||||
output = pathlib.Path(arguments[0]).resolve()
|
||||
source = output.with_name(LIBRARY_NAME)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapAssetClearMesh")
|
||||
mesh.from_pydata([(-1.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)], [], [(0, 1, 2)])
|
||||
obj = bpy.data.objects.new(OBJECT_NAME, mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(source), check_existing=False, compress=True)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
with bpy.data.libraries.load(str(source), link=True) as (data_from, data_to):
|
||||
if OBJECT_NAME not in data_from.objects:
|
||||
raise RuntimeError("asset-clear source object is missing")
|
||||
data_to.objects = [OBJECT_NAME]
|
||||
linked = data_to.objects[0]
|
||||
if linked is None:
|
||||
raise RuntimeError("asset-clear linked object is missing")
|
||||
bpy.context.scene.collection.objects.link(linked)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(output), check_existing=False, compress=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user