2323from bpy .types import SpaceView3D
2424from mathutils import Vector , Matrix
2525from gpu_extras .batch import batch_for_shader
26+ from typing import Union
2627
2728
2829ERROR_ELEMENTS_COLOR = (1 , 0.2 , 0.322 , 1 ) # RED
@@ -35,15 +36,6 @@ def transparent_color(color, alpha=0.1):
3536 return color
3637
3738
38- def bm_check_vertex_in_groups (vertex , deform_layer , groups ):
39- """returns tuple boolean (whether vertex is in any of the groups)
40- and related group index"""
41- for group_index in vertex [deform_layer ].keys ():
42- if group_index in groups :
43- return True , group_index
44- return False , None
45-
46-
4739class ProfileDecorator :
4840 installed = None
4941
@@ -148,12 +140,12 @@ def __call__(self, context, get_custom_bmesh=None, draw_faces=False, exit_edit_m
148140 # deform_layer is None if there are no verts assigned to vertex groups
149141 # even if there are vertex groups in the obj.vertex_groups
150142 if deform_layer :
151- is_arc , group_index = bm_check_vertex_in_groups (vertex , deform_layer , arc_groups )
143+ is_arc , group_index = tool . Blender . bmesh_check_vertex_in_groups (vertex , deform_layer , arc_groups )
152144 if is_arc :
153145 arcs .setdefault (group_index , []).append (vertex )
154146 special_vertex_indices [vertex .index ] = group_index
155147
156- is_circle , group_index = bm_check_vertex_in_groups (vertex , deform_layer , circle_groups )
148+ is_circle , group_index = tool . Blender . bmesh_check_vertex_in_groups (vertex , deform_layer , circle_groups )
157149 if is_circle :
158150 circles .setdefault (group_index , []).append (vertex )
159151 special_vertex_indices [vertex .index ] = group_index
0 commit comments