shifter.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:Shifter 作者: BlendingJake 项目源码 文件源码
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"}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号