tag:blogger.com,1999:blog-8180939159898077395.post5541034545456481604..comments2023-06-05T05:09:15.108-07:00Comments on Red9 Studio Tools for Maya: MetaClass - extra candy for complex Json attributesRed9http://www.blogger.com/profile/09115553421548573994noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8180939159898077395.post-25160228827600717792012-10-17T16:16:01.636-07:002012-10-17T16:16:01.636-07:00We do exactly this in our metaclass code. There i...We do exactly this in our metaclass code. There is a cost tho. When your inside your metaclass and you do self.foo = {} the __getattribute__ kicks in. Inspects the data cross references it data you might not want to serialize then automatically writes the data to the Maya node. You'll have to manage creating and deleting the attribute if the types change. Something to remember with references. It not cheap. Has benefits and drawbacks. Is not explicit. Your choice. Any heavy wrapping will slow you down. But if you only take the metadata when you about to work with it it's not an issue. I have scenes with 1000s of meta nodes. I only create these heavy instances when I'm about to work with them.Anonymoushttps://www.blogger.com/profile/12743386408772216285noreply@blogger.comtag:blogger.com,1999:blog-8180939159898077395.post-79102549490246213362012-10-16T14:08:18.045-07:002012-10-16T14:08:18.045-07:00if it is know a head of time that setting an attr ...if it is know a head of time that setting an attr like that is going to be read only and then there is a method to make modifications to it, that works too. Being able to just assign a new value to the attr is always more convenient but that depends on the cost. If there is no risk the I'd say keep on with what you did to make it mutable.mattanimationhttps://www.blogger.com/profile/09572885537710551466noreply@blogger.com