functions.py 文件源码

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

项目:coa_tools 作者: ndee85 项目源码 文件源码
def create_armature(context):
    obj = bpy.context.active_object
    sprite_object = get_sprite_object(obj)
    armature = get_armature(sprite_object)

    if armature != None:
        context.scene.objects.active = armature
        armature.select = True
        return armature
    else:
        amt = bpy.data.armatures.new("Armature")
        armature = bpy.data.objects.new("Armature",amt)
        armature.parent = sprite_object
        context.scene.objects.link(armature)
        context.scene.objects.active = armature
        armature.select = True
        amt.draw_type = "BBONE"
        return armature
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号