diff options
Diffstat (limited to 'mesh_tissue')
-rw-r--r-- | mesh_tissue/utils.py | 4 | ||||
-rw-r--r-- | mesh_tissue/weight_tools.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/mesh_tissue/utils.py b/mesh_tissue/utils.py index b617ac93..b4331084 100644 --- a/mesh_tissue/utils.py +++ b/mesh_tissue/utils.py @@ -1251,7 +1251,7 @@ def get_weight(vertex_group, n_verts): :type vertex_group: :class:'bpy.types.VertexGroup' :arg n_verts: Number of Vertices (output list size). :type n_verts: int - :return: Readed weight values. + :return: Read weight values. :rtype: list """ weight = [0]*n_verts @@ -1267,7 +1267,7 @@ def get_weight_numpy(vertex_group, n_verts): :type vertex_group: :class:'bpy.types.VertexGroup' :arg n_verts: Number of Vertices (output list size). :type n_verts: int - :return: Readed weight values as numpy array. + :return: Read weight values as numpy array. :rtype: :class:'numpy.ndarray' """ weight = [0]*n_verts diff --git a/mesh_tissue/weight_tools.py b/mesh_tissue/weight_tools.py index 2736945e..8576b88c 100644 --- a/mesh_tissue/weight_tools.py +++ b/mesh_tissue/weight_tools.py @@ -2513,7 +2513,7 @@ class vertex_group_to_vertex_colors(Operator): bpy.ops.object.mode_set(mode='OBJECT') group_name = obj.vertex_groups[group_id].name - bpy.ops.mesh.vertex_color_add() + me.vertex_colors.new() colors_id = obj.data.vertex_colors.active_index colors_name = group_name @@ -2694,8 +2694,8 @@ class curvature_to_vertex_groups(Operator): def execute(self, context): bpy.ops.object.mode_set(mode='OBJECT') - bpy.ops.mesh.vertex_color_add() vertex_colors = context.active_object.data.vertex_colors + vertex_colors.new() vertex_colors[-1].active = True vertex_colors[-1].active_render = True vertex_colors[-1].name = "Curvature" @@ -2706,7 +2706,7 @@ class curvature_to_vertex_groups(Operator): blur_iterations=self.blur_iterations, clean_angle=self.max_angle, dirt_angle=self.min_angle) bpy.ops.object.vertex_colors_to_vertex_groups(invert=self.invert) - bpy.ops.mesh.vertex_color_remove() + vertex_colors.remove(vertex_colors.active) return {'FINISHED'} class face_area_to_vertex_groups(Operator): |