interactive.py 文件源码

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

项目:config 作者: mindbender-studio 项目源码 文件源码
def set_defaults(*args):
    """Set currently selected values from channel box to their default value

    If no channel is selected, default all keyable attributes.

    """

    for node in cmds.ls(selection=True):
        selected_channels = read_selected_channels()
        for channel in (selected_channels or
                        cmds.listAttr(node, keyable=True)):
            try:
                default = cmds.attributeQuery(channel,
                                              node=node,
                                              listDefault=True)[0]
            except Exception:
                continue

            else:
                cmds.setAttr(node + "." + channel, default)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号