Beispiel #1
0
    def test_object_in_master_collection(self):
        lights = 2
        if not self.experimental_sync:
            self.expected_counts = {MessageType.LIGHT: lights}
            raise unittest.SkipTest("FAILS: Only one point light remains")

        location = "0.0, -3.0, 0.0"
        self.send_strings([
            bl.active_layer_master_collection() +
            bl.ops_objects_light_add(location=location)
        ],
                          to=0)

        # with a delay > latency all the messages are transmitted and the problem does not occur
        # delay = 2.0

        time.sleep(0.0)

        location = "0.0, 3.0, 0.0"
        self.send_strings([
            bl.active_layer_master_collection() +
            bl.ops_objects_light_add(location=location)
        ],
                          to=1)

        self.assert_matches()

        # Issue #222
        pass
Beispiel #2
0
    def test_object_in_master_collection(self):

        # these are broken
        self.ignore = {
            MessageType.LIGHT,
            MessageType.OBJECT_VISIBILITY,
            MessageType.ADD_OBJECT_TO_VRTIST,
        }

        location = "0.0, -3.0, 0.0"
        self.send_strings([
            bl.active_layer_master_collection() +
            bl.ops_objects_light_add(location=location)
        ],
                          to=0)

        # with a delay > latency all the messages are transmitted and the problem does not occur
        # delay = 2.0

        time.sleep(0.0)

        location = "0.0, 3.0, 0.0"
        self.send_strings([
            bl.active_layer_master_collection() +
            bl.ops_objects_light_add(location=location)
        ],
                          to=1)

        if not self.experimental_sync:
            self.expected_counts = {MessageType.LIGHT: 2}
        self.assert_matches()
        pass
Beispiel #3
0
    def test_light(self):
        if self.vrtist_protocol:
            # use exception since the @unittest.skipIf() cannot access self
            raise unittest.SkipTest("FAILS in VRtist mode")

        self.send_strings([
            bl.ops_objects_light_add("POINT"),
            bl.ops_objects_light_add("POINT")
        ],
                          to=0)

        self.send_strings([bl.data_objects_rename("Point.001", "Point")], to=0)
        self.send_strings([bl.data_objects_rename("Point.001", "Point")], to=0)
        self.send_strings([bl.data_objects_rename("Point.001", "Point")], to=0)

        self.assert_matches()
Beispiel #4
0
    def test_light(self):
        # Rename the light datablock
        if self.vrtist_protocol:
            raise unittest.SkipTest("Broken in VRtist-only")

        self.send_strings([bl.ops_objects_light_add("POINT")], to=0)
        self.send_strings([bl.data_lights_rename("Point", "__Point")], to=0)
        self.send_strings([bl.data_lights_update("__Point", ".energy = 0")],
                          to=0)

        self.assert_matches()
Beispiel #5
0
    def test_add_object(self):
        self.send_strings(
            [bl.active_layer_master_collection(),
             bl.ops_objects_light_add()],
            to=0)
        delay = 0.0
        time.sleep(delay)
        self.send_strings([bl.data_scenes_rename("Scene", "Scene_renamed")],
                          to=1)

        # on 1 The light is in the scene but not in the master collection of the renamed scene
        self.assert_matches()
Beispiel #6
0
    def test_object_in_master_collection(self):
        lights = 2
        if not self.experimental_sync:
            self.expected_counts = {MessageType.LIGHT: lights}
            raise unittest.SkipTest("FAILS: Only one point light remains")
        else:
            scenes = 1
            # these are broken
            self.ignored_messages |= {
                MessageType.ADD_OBJECT_TO_VRTIST,
            }
            self.expected_counts = {
                MessageType.BLENDER_DATA_CREATE: lights + scenes
            }
            raise unittest.SkipTest("FAILS: see #222")

        location = "0.0, -3.0, 0.0"
        self.send_strings([
            bl.active_layer_master_collection() +
            bl.ops_objects_light_add(location=location)
        ],
                          to=0)

        # with a delay > latency all the messages are transmitted and the problem does not occur
        # delay = 2.0

        time.sleep(0.0)

        location = "0.0, 3.0, 0.0"
        self.send_strings([
            bl.active_layer_master_collection() +
            bl.ops_objects_light_add(location=location)
        ],
                          to=1)

        self.assert_matches()

        # Issue #222
        pass
Beispiel #7
0
    def test_add_object(self):
        self.send_strings([
            bl.active_layer_collection("Collection1"),
            bl.ops_objects_light_add()
        ],
                          to=0)
        delay = 0.0
        time.sleep(delay)
        self.send_strings(
            [bl.data_collections_rename("Collection1", "Collection1_renamed")],
            to=1)

        # 2020-08-13 21:24:20,703 W mixer.blender_client                  -     collection = share_data.blender_collections[collection_name]                 [.\mixer\log_utils.py:62]
        # 2020-08-13 21:24:20,706 W mixer.blender_client                  - KeyError: 'Collection1'                                                         [.\mixer\log_utils.py:62]
        # The point light is in no collection
        successful = False
        self.assertTrue(successful)