Tests: Add basic subdivision tests for Multires modifier

This test replaces the existing multires modifier test with one that
subdivides the mesh and then compares the result. The existing one has
little purpose, as it applies a modifier with 0 subdivision levels.

Pull Request: https://projects.blender.org/blender/blender/pulls/140567
This commit is contained in:
Sean Kim
2025-06-24 21:05:16 +02:00
committed by Sean Kim
parent f99b35463a
commit c542dad3c6
2 changed files with 9 additions and 5 deletions

BIN
tests/files/modeling/modifiers.blend (Stored with Git LFS)

Binary file not shown.

View File

@@ -10,7 +10,7 @@ from random import seed
import bpy
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
from modules.mesh_test import RunTest, ModifierSpec, SpecMeshTest
from modules.mesh_test import RunTest, ModifierSpec, SpecMeshTest, OperatorSpecObjectMode
seed(0)
@@ -151,8 +151,12 @@ def main():
SpecMeshTest("CylinderMask", "testCylinderMask", "expectedCylinderMask",
[ModifierSpec('mask', 'MASK', {'vertex_group': "mask_vertex_group"})]),
SpecMeshTest("ConeMultiRes", "testConeMultiRes", "expectedConeMultiRes",
[ModifierSpec('multires', 'MULTIRES', {})]),
SpecMeshTest("CubeMultires", "testCubeMultires", "expectedCubeMultires",
[
ModifierSpec('multires', 'MULTIRES', {}),
OperatorSpecObjectMode('multires_subdivide', {'modifier': 'multires'}),
OperatorSpecObjectMode('modifier_apply', {'modifier': 'multires'})
], apply_modifier=False),
# 24
SpecMeshTest("CubeScrew", "testCubeScrew", "expectedCubeScrew",