MCPcopy Create free account
hub / github.com/coldtype/st2 / common

Function common

tests/common.py:19–48  ·  view source on GitHub ↗
(bw:BpyWorld)

Source from the content-addressed store, hash-verified

17
18
19def common(bw:BpyWorld):
20 BpyObj.Find("Cube").delete()
21 bw.cycles(32, False, Rect(1080, 1080))
22 bw.timeline(Timeline(30))
23 bw.scene.frame_set(0)
24
25 bpy.context.preferences.inputs.use_emulate_numpad = True
26 bpy.context.preferences.view.show_tooltips_python = True
27
28 import addon_utils
29 addon_utils.disable("ST2")
30 addon_utils.enable("ST2")
31 bpy.ops.st2.import_dependencies()
32
33 st2 = bw.scene.st2
34 st2.font_path = str(nickel.path)
35
36 for _ in range(0, 2):
37 for obj in bpy.data.objects:
38 if obj.name.startswith("ST2:"):
39 bpy.data.objects.remove(obj, do_unlink=True)
40
41 bpy.ops.st2.settype_with_scene_defaults()
42
43 to = BpyObj.Find(bpy.context.object)
44
45 assert to.obj is not None
46 assert to.obj.location == vec(0,0,0)
47
48 return to

Callers 4

extremaFunction · 0.85
test_bake_timingFunction · 0.85
test_bake_no_timingFunction · 0.85
setupFunction · 0.85

Calls 1

vecFunction · 0.85

Tested by 4

extremaFunction · 0.68
test_bake_timingFunction · 0.68
test_bake_no_timingFunction · 0.68
setupFunction · 0.68