Ejemplo n.º 1
0
    def test_final_cropped(self):
        scene = bpy.context.scene
        scene.render.use_crop_to_border = True

        scene.luxcore.active_layer_index = 0
        exporter = Exporter(scene)

        props = config.convert(exporter, scene)
        check_resolution(self, props, 30, 10)
Ejemplo n.º 2
0
    def test_final_uncropped(self):
        scene = bpy.context.scene
        # Blender expects a cropped image in all cases
        scene.render.use_crop_to_border = False

        scene.luxcore.active_layer_index = 0
        exporter = Exporter(scene)

        props = config.convert(exporter, scene)
        check_resolution(self, props, 30, 10)
Ejemplo n.º 3
0
    def test_different_resolution(self):
        scene = bpy.context.scene

        backup_x = scene.render.resolution_x
        backup_y = scene.render.resolution_y

        scene.render.resolution_x = 543
        scene.render.resolution_y = 789
        bpy.context.scene.render.use_crop_to_border = False
        props = config.convert(bpy.context.scene)

        # Restore original resolution
        scene.render.resolution_x = backup_x
        scene.render.resolution_y = backup_y

        check_resolution(self, props, 163, 79)
Ejemplo n.º 4
0
    def test_different_resolution(self):
        scene = bpy.context.scene

        backup_x = scene.render.resolution_x
        backup_y = scene.render.resolution_y

        scene.render.resolution_x = 543
        scene.render.resolution_y = 789
        scene.render.use_crop_to_border = False

        scene.luxcore.active_layer_index = 0
        exporter = Exporter(scene)
        props = config.convert(exporter, scene)

        # Restore original resolution
        scene.render.resolution_x = backup_x
        scene.render.resolution_y = backup_y

        check_resolution(self, props, 163, 79)
Ejemplo n.º 5
0
 def test_final_cropped(self):
     bpy.context.scene.render.use_crop_to_border = True
     props = config.convert(bpy.context.scene)
     check_resolution(self, props, 30, 10)
Ejemplo n.º 6
0
 def test_final_uncropped(self):
     # Blender expects a cropped image in all cases
     bpy.context.scene.render.use_crop_to_border = False
     props = config.convert(bpy.context.scene)
     check_resolution(self, props, 30, 10)