is it possible?
I can add one : bpy.ops.object.vertex_group()
but cant find a way to rename it when given default name " Group"
is it possible?
I can add one : bpy.ops.object.vertex_group()
but cant find a way to rename it when given default name " Group"
import bpy
ob= bpy.context.active_object
bpy.ops.object.vertex_group_add()
ob.vertex_groups.active.name = "NAME"
No operator required:
ob = bpy.context.object
ob.vertex_groups.new("TheName")
See here:
Also: operators represent user actions and they don’t return references to objects or the like. RNA methods and properties are more of an API.