def execute(self, context):
ob = context.object
if self.direction and ob is not None:
verts = bmesh.from_edit_mesh(ob.data).verts
indices = []
for v in verts:
if v.select:
indices.append(v.index)
size = len(indices)
if self.direction == "x":
ob.shifter_x_verts = to_string(indices)
elif self.direction == "y":
ob.shifter_y_verts = to_string(indices)
else:
ob.shifter_z_verts = to_string(indices)
self.report({"INFO"}, "Shifter: Set {} Vertices".format(size))
return {"FINISHED"}
评论列表
文章目录