Page MenuHome

Add Operator tests
Confirmed, NormalPublic

Description

Introduction

This task tracks progress of regression tests for mesh operators. A regression takes a test mesh, applies an operator on it and compares the result with a reference mesh (typically called expected object).
Note: Multiple developers can work on this task after discussing with other subscribers/assignee for clarification.

Adding a new test

  1. Define the test case in the python file blender/tests/python/operators.py
  2. Create a test mesh and an expected mesh in lib/tests/modeling/operators.blend

The wiki explains the steps in much more details: Python Tests

Some examples:
D10218 (remove doubles)
rB22a8a3b21497 (Deform tests)
rB8373f497b (Curve tests)

Test cases

First screening of operators can be find in this sheet link for insights.
Add new tests for operators from the list below, they can be accessed by bpy.ops.mesh in the python console in Blender. For documentation, please refer here

OperatorTypical caseFurther casesComments
average_normals
beautify_fill
bevelxtests are in bevel_regression.blend and bevel_operator.py
bisectx
blend_from_shapex
bridge_edge_loopsx
colors_reverse
colors_rotate
convex_hull
customdata_custom_splitnormals_add
customdata_custom_splitnormals_clear
customdata_mask_clear
customdata_skin_add
customdata_skin_clear
decimatex
deletexdelete Faces/Verts/Edges
delete_edgeloopxdelete Verts/Edges
delete_loosex
dissolve_degeneratex
dissolve_edgesx
dissolve_facesx
dissolve_limited
dissolve_mode
dissolve_vertsx
dupli_extrude_cursorRequires user input, cannot test.
duplicatex
duplicate_move
edge_collapse
edge_face_addx
edge_rotatex
edge_splitx
edgering_selectRequires user input, cannot test.
edges_select_sharp
extrude_contextRequires user input, cannot test.
extrude_context_moveRequires user input, cannot test.
extrude_edges_indivRequires user input, cannot test.
extrude_edges_moveRequires user input, cannot test.
extrude_faces_indivRequires user input, cannot test.
extrude_faces_moveRequires user input, cannot test.
extrude_regionRequires user input, cannot test.
extrude_region_moveRequires user input, cannot test.
extrude_region_shrink_fattenRequires user input, cannot test.
extrude_repeatRequires user input, cannot test.
extrude_vertices_moveRequires user input, cannot test.
extrude_verts_indivRequires user input, cannot test.
face_make_planarx
face_split_by_edgesx
faces_mirror_uv
faces_select_linked_flatx
faces_shade_flat
faces_shade_smooth
fillx
fill_gridx
fill_holesx
flip_normals
hide
insetx
intersectx
intersect_booleanxxSee boolean_operator.py
knife_project
knife_tool
loop_multi_select
loop_select
loop_to_region
loopcut
loopcut_slide
mark_freestyle_edge
mark_freestyle_face
mark_seam
mark_sharp
merge
merge_normals
mod_weighted_strength
normals_make_consistent
normals_tools
offset_edge_loops
offset_edge_loops_slide
paint_mask_extract
paint_mask_slice
point_normals
poke
polybuild_delete_at_cursor
polybuild_dissolve_at_cursor
polybuild_extrude_at_cursor_move
polybuild_face_at_cursor
polybuild_face_at_cursor_move
polybuild_split_at_cursor
polybuild_split_at_cursor_move
polybuild_transform_at_cursor
polybuild_transform_at_cursor_move
primitive_circle_addrotation=
primitive_cone_addlocation=
primitive_cube_add
primitive_cube_add
primitive_cylinder_add
primitive_grid_add
primitive_ico_sphere_add
primitive_monkey_add
primitive_plane_add
primitive_torus_add
primitive_uv_sphere_add
quads_convert_to_tris
region_to_loop
remove_doubles
reveal
rip
rip_edge
rip_edge_move
rip_move
screw
select_all
select_axis
select_face_by_sides
select_interior_faces
select_less
select_linked
select_linked_pick
select_loose
select_mirror
select_mode
select_more
select_next_item
select_non_manifold
select_nth
select_prev_item
select_random
select_similar
select_similar_region
select_ungrouped
separate
set_normals_from_faces
shape_propagate_to_all
shortest_path_pick
shortest_path_select
smoothen_normals
solidify
sort_elements
spin
split
split_normals
subdivide
subdivide_edgering
symmetrize
symmetry_snap
tris_convert_to_quads
unsubdivide
uv_texture_add
uv_texture_remove
uvs_reverse
uvs_rotate
vert_connect
vert_connect_concave
vert_connect_nonplanar
vert_connect_path
vertex_color_add
vertex_color_remove
vertices_smooth
vertices_smooth_laplacian
wireframe