def test_cached_attribute(self):
print(u"test_cached_attribute")
cmds.file(new=True, f=True)
cube = cmds.polyCube()[0]
m1 = mtn.M(u"pCube1")
# m1._cache = True # default:True
m2 = mtn.M(u"pCube1")
m2._cache = False
assert(m1._cache_attribute == {})
assert(m2._cache_attribute == {})
m1.t
m2.t
assert(u"t" in m1._cache_attribute)
assert(u"t" not in m2._cache_attribute)
assert(m1._cache == True)
assert(m2._cache == False)
assert(m1.t._cache == True)
assert(m2.t._cache == False)
assert(m1.t.tx._cache == True)
assert(m2.t.tx._cache == False)
评论列表
文章目录