ml_pivot.py 文件源码

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

项目:ml_tools 作者: morganloomis 项目源码 文件源码
def editPivot(self, *args):
        sel = mc.ls(sl=True)

        if not sel:
            om.MGlobal.displayWarning('Nothing selected.')
            return

        if len(sel) > 1:
            om.MGlobal.displayWarning('Only works on one node at a time.')
            return

        if mc.attributeQuery('ml_pivot_handle', exists=True, node=sel[0]):
            #we have a pivot handle selected
            return

        self.node = sel[0]

        if is_pivot_connected(sel[0]):
            driverAttr = pivot_driver_attr(sel[0])
            if driverAttr:
                self.editPivotDriver(driverAttr)
            else:
                om.MGlobal.displayWarning('Pivot attribute is connected, unable to edit.') 
            return

        self.editPivotHandle()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号