wrapclass.py 文件源码

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

项目:metan 作者: utatsuya 项目源码 文件源码
def attr(self, attr):
        # self.validCheck()

        if self._cache:
            if attr in self._cache_attribute:
                return self._cache_attribute[attr]

        attrname = self.name()+u"."+attr
        if cmds.objExists(attrname):
            _attribute = Attribute(attrname, cache=self._cache)
            if self._cache:
                self._cache_attribute[attr] = _attribute
            return _attribute
        else:
            attrname = self.name() + u"." + self._MPlug.partialName() + attr
            if cmds.objExists(attrname):
                _attribute = Attribute(attrname, cache=self._cache)
                if self._cache:
                    self._cache_attribute[attr] = _attribute
                return _attribute
            else:
                raise AttributeError("%r has no attribute or method named '%s'" % (self, attr))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号