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:
raise AttributeError("%r has no attribute or method named '%s'" % (self, attr))
评论列表
文章目录