From ed91a298c0a63e44820af2c70bc814ba07b4089f Mon Sep 17 00:00:00 2001 From: Sean Kim Date: Tue, 15 Apr 2025 23:16:24 +0200 Subject: [PATCH] Fix: Sculpt performance test does not run The runner for the performance tests / benchmarks uses python 3.9, so the `match` statement is invalid as a concept. Pull Request: https://projects.blender.org/blender/blender/pulls/137563 --- tests/performance/tests/sculpt.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/performance/tests/sculpt.py b/tests/performance/tests/sculpt.py index a0f81fd23c6..25ba082477d 100644 --- a/tests/performance/tests/sculpt.py +++ b/tests/performance/tests/sculpt.py @@ -67,13 +67,14 @@ def prepare_sculpt_scene(context: any, mode: SculptMode, brush_type: BrushType): group.interface.new_socket("Geometry", in_out='OUTPUT', socket_type='NodeSocketGeometry') group_output_node = group.nodes.new('NodeGroupOutput') - match mode: - case SculptMode.MESH: - size = 1500 - case SculptMode.MULTIRES: - size = 150 - case SculptMode.DYNTOPO: - size = 1500 + if mode == SculptMode.MESH: + size = 1500 + elif mode == SculptMode.MULTIRES: + size = 150 + elif mode == SculptMode.DYNTOPO: + size = 1500 + else: + raise NotImplementedError grid_node = group.nodes.new('GeometryNodeMeshGrid') grid_node.inputs["Size X"].default_value = 2.0