()
| 658 | |
| 659 | |
| 660 | def view3d_multi_mode_select(): |
| 661 | # Note, this test should be extended to change modes for each object type. |
| 662 | e, t, window = ui.test_window() |
| 663 | yield from _view3d_startup_area_maximized(e) |
| 664 | |
| 665 | object_names = [] |
| 666 | |
| 667 | for i, (menu_search, ob_name) in enumerate(( |
| 668 | ("Add -> Armature", "Armature"), |
| 669 | ("Add -> Text", "Text"), |
| 670 | ("Add -> Mesh -> Cube", "Cube"), |
| 671 | ("Add -> Curve -> Bézier", "Curve"), |
| 672 | ("Add -> Volume -> Empty", "Volume Empty"), |
| 673 | ("Add -> Metaball -> Ball", "Metaball"), |
| 674 | ("Add -> Lattice", "Lattice"), |
| 675 | ("Add -> Light -> Point", "Point Light"), |
| 676 | ("Add -> Camera", "Camera"), |
| 677 | ("Add -> Empty -> Plain Axis", "Empty"), |
| 678 | )): |
| 679 | yield from ui.call_menu(e, menu_search) |
| 680 | # Single object-mode action (to test mixing different kinds of undo steps). |
| 681 | yield e.g.z().text(str(i * 2)).ret() |
| 682 | # Rename. |
| 683 | yield e.f2().text(ob_name).ret() |
| 684 | |
| 685 | object_names.append(window.view_layer.objects.active.name) |
| 686 | |
| 687 | yield from ui.call_menu(e, "View -> Frame All") |
| 688 | # print(object_names) |
| 689 | |
| 690 | for ob_name in object_names: |
| 691 | yield from _view3d_object_select_by_name(e, ob_name) |
| 692 | yield |
| 693 | # print() |
| 694 | # print('=' * 40) |
| 695 | # print(window.view_layer.objects.active.name, ob_name) |
| 696 | |
| 697 | for ob_name in reversed(object_names): |
| 698 | t.assertEqual(ob_name, window.view_layer.objects.active.name) |
| 699 | yield e.ctrl.z() |
| 700 | |
| 701 | |
| 702 | def view3d_multi_mode_multi_window(): |
nothing calls this directly
no test coverage detected