BModel.py 文件源码

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

项目:blemd 作者: niacdoial 项目源码 文件源码
def RotateAroundWorld(self, obj, rotation):  # XCX used?
        print(rotation, type(rotation))
        origParent = obj.parent
        d = bpy.data.new('UTEMP_PL', None)
        d.location = Vector((0,0,0))
        obj.parent = d
        d.rotation_euler = Euler(rotation, 'XYZ')
        act_bk = bpy.ops.active
        bpy.ops.active = d
        bpy.ops.object.transform_apply(rotation=True)
        bpy.ops.active = obj
        bpy.ops.object.transform_apply(rotation=True)
        bpy.ops.active = act_bk
        obj.parent = None
        bpy.data.objects.remove(d)
        # --delete d
        # --if (origParent != undefined) then
        # --    obj.parent = origParent
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号