Tuesday 26 June 2012

r9MetaClass Vimeo demo

This is a brief demo of the initial Red9 MetaClass Python API aimed at managing and wrapping data to a Maya MetaNode system. All data is serialized to Maya network nodes so is stored with the scene. There's handling for JSON serializing of complex data and retrieving that data back in a very neat and simple Pythonic manner, getting the data back directly from the Maya node but in a completely seamless way.

This is just the initial fleshing out, the long term aim to to provide a generic method of managing complex Maya rig structures and marking data without you having to write your own API. So you'd make an mClass rig node and hook the rig up to that making retrieval of controllers etc a doddle!

http://red9-consultancy.blogspot.co.uk/search/label/Download

All comments very welcome



Sunday 24 June 2012

r9MetaClass : fleshing out a new Meta data system API

I'm just starting to flesh out a new python based metaData system for Maya, aimed at serializing complex data and managing systems in a more pythonic manner. The idea is that on a MayaNetwork node we handle all attribute calls (__getattribute__, __setattr__ , addAttr etc) and if needed serialize complex data such as dict/lists etc via JSON to a string attr. When you do a simple attr call to the metaClass it checks the MayaNode and if it's a JSON managed string, will give you back the complex data as it was, handling all the deserialization for you.

So from the class object you can do the following where 'complexAttr' is just a JSON serialized string attribute on the MayaNode itself

node.complexAttr['Meta']   
#deserialize attribute and from the returned dict give me the key value ['Meta']

It also manages connections via message links, all wrapped in the same pythonic manner. The same standard node.attr call to a message attr will give you back a list of connections to that msg attr itself.

There are a few other neat tricks in there too that I'm testing, although not yet sure of the best way to manage some of these, such as the r9Meta.GetMetaNodes() which will give you back not just the MayaMetaNodes, but those nodes initialized to the correct class object ready for use.

Anyway, I'm looking for testers and some ideas as to how to expand on this. Initially I was going to use it as part of a generic Rig marking system but kind of thinking it could go way further than that.

Mail me if you fancy a play with the API. It's also included in v1.24 of the studioPack, just cjeck the Download folder

Red