importing.py 文件源码

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

项目:io_scene_kcl 作者: Syroot 项目源码 文件源码
def _create_mesh_object(self, bm, name):
        # Transform the coordinate system so that Y is up.
        matrix_y_to_z = Matrix(((1, 0, 0), (0, 0, -1), (0, 1, 0)))
        bmesh.ops.transform(bm, matrix=matrix_y_to_z, verts=bm.verts)
        # Create the mesh into which each bmesh will be written.
        mesh = bpy.data.meshes.new(name)
        bm.to_mesh(mesh)
        bm.free()
        # Create, group and link an object representing that mesh.
        ob = bpy.data.objects.new(name, mesh)
        self._add_to_group(ob, "KCL")
        bpy.context.scene.objects.link(ob)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号