| 17 | |
| 18 | |
| 19 | def 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 |