Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHimanshi Kalra <calra>2021-04-29 17:29:11 +0300
committerHimanshi Kalra <himanshikalra98@gmail.com>2021-04-29 17:45:11 +0300
commit7134b9dacadb933f884ffdbb1e5f433839dc47f2 (patch)
treebb52c77c54afee37dab4e2a19ef57ac75918de51 /tests
parent738a890025eccc1b98fdc11386a9f203acda71c4 (diff)
Added Operator tests: unsubdivide, shading, vertex connect and mark seam
Added tests for: * Mark Seam * Shade flat * Shade smooth * Unsubdivide * Vertex Connect Path * select nth (Checkered Deselect) Notes: 1) Shade flat, shade smooth are base test cases (to check mesh doesn't change for real) Updated blend file: tests/modeling/operators.blend Reviewed By: zazizizou, mont29 Differential Revision: https://developer.blender.org/D10893
Diffstat (limited to 'tests')
-rw-r--r--tests/python/operators.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/python/operators.py b/tests/python/operators.py
index 309a872ac67..4c863edfbdb 100644
--- a/tests/python/operators.py
+++ b/tests/python/operators.py
@@ -196,6 +196,14 @@ def main():
MeshTest("SphereFillHoles", "testSphereFillHoles", "expectedSphereFillHoles",
[OperatorSpecEditMode("fill_holes", {"sides": 9}, "VERT", {i for i in range(481)})]),
+ # face shade smooth (not a real test)
+ MeshTest("CubeShadeSmooth", "testCubeShadeSmooth", "expectedCubeShadeSmooth",
+ [OperatorSpecEditMode("faces_shade_smooth", {}, "VERT", {i for i in range(8)})]),
+
+ # faces shade flat (not a real test)
+ MeshTest("CubeShadeFlat", "testCubeShadeFlat", "expectedCubeShadeFlat",
+ [OperatorSpecEditMode("faces_shade_flat", {}, "FACE", {i for i in range(6)})]),
+
# inset faces
MeshTest("CubeInset",
"testCubeInset", "expectedCubeInset", [OperatorSpecEditMode("inset", {"thickness": 0.2}, "VERT",
@@ -226,6 +234,10 @@ def main():
MeshTest("EmptyMeshLoopMultiSelect", "testEmptyMeshLoopMultiSelect", "expectedEmptyMeshLoopMultiSelect",
[OperatorSpecEditMode("loop_multi_select", {}, "VERT", {})]),
+ # mark seam
+ MeshTest("CubeMarkSeam", "testCubeMarkSeam", "expectedCubeMarkSeam",
+ [OperatorSpecEditMode("mark_seam", {}, "EDGE", {1})]),
+
# select all
MeshTest("CircleSelectAll", "testCircleSelectAll", "expectedCircleSelectAll",
[OperatorSpecEditMode("select_all", {}, "VERT", {1})]),
@@ -296,6 +308,26 @@ def main():
MeshTest("EmptyMeshSelectLinked", "testEmptyMeshSelectLinked", "expectedEmptyMeshSelectLinked",
[OperatorSpecEditMode("select_linked", {}, "VERT", {})]),
+ # select nth (checkered deselect)
+ MeshTest("CircleSelect2nd", "testCircleSelect2nd", "expectedCircleSelect2nd",
+ [OperatorSpecEditMode("select_nth", {}, "VERT", {i for i in range(32)})]),
+
+ # unsubdivide
+ # normal case
+ MeshTest("CubeFaceUnsubdivide", "testCubeUnsubdivide", "expectedCubeUnsubdivide",
+ [OperatorSpecEditMode("unsubdivide", {}, "FACE", {i for i in range(6)})]),
+
+ # T87259 - test cases
+ MeshTest("CubeEdgeUnsubdivide", "testCubeEdgeUnsubdivide", "expectedCubeEdgeUnsubdivide",
+ [OperatorSpecEditMode("unsubdivide", {}, "EDGE", {i for i in range(6)})]),
+ MeshTest("UVSphereUnsubdivide", "testUVSphereUnsubdivide", "expectedUVSphereUnsubdivide",
+ [OperatorSpecEditMode("unsubdivide", {'iterations': 9}, "FACE", {i for i in range(512)})]),
+
+ # vert connect path
+ # Tip: It works only if there is an already existing face or more than 2 vertices.
+ MeshTest("CubeVertConnectPath", "testCubeVertConnectPath", "expectedCubeVertConnectPath",
+ [OperatorSpecEditMode("vert_connect_path", {}, "VERT", {0, 5})]),
+
]
operators_test = RunTest(tests)