Red9 StudioPack - upgrades and Git

Thought it was about time I posted a few major upgrades to the Red9 StudioPack for Maya. Firstly the code, which is open source, is now on GitHub here:

The gitHub trunk will always be the dev branch, I’ll be taking release tags every so often when I get a solid release to push to the Autodesk Exchange site.

Now for a few goodies that you may have missed:

Red9 Audio Handlers:
[video=vimeo;89449170]https://vimeo.com/89449170[/video]

Red9 Advanced PoseSaver upgrades:
[video=vimeo;88391202]https://vimeo.com/88391202[/video]

Thanks for all the support from some pretty major studios, and keep the bugs / suggestions coming.

cheers

Mark

Hey Mark, I was writing a similar wrapper to dagpaths and remembered this lib. I wanted just a simple wrapper for getting things like parent and attributes, etc and wanted it to be really fast coughpymelcough. I ran some tests with your MetaNode and it seems way slow. Am I using this incorrectly?


import pymel.core as pm
import path
import time
import sys
sys.path.append(r'C:	mp')
import Red9.core.Red9_Meta as r9Meta

now = time.clock()
c = cmds.ls(dag=True, type='mesh')
print 'cmds', time.clock() - now

now = time.clock()
c = [path.path(p) for p in cmds.ls(dag=True, type='mesh')]
print 'path', time.clock() - now

now = time.clock()
c = pm.ls(dag=True, type='mesh')
print 'pymel', time.clock() - now

now = time.clock()
c = [r9Meta.MetaClass(p) for p in cmds.ls(dag=True, type='mesh')]
print 'red9', time.clock() - now

cmds 0.517676125242
path 0.0414682178074
pymel 0.80415282423
red9 38.8088356679

Hi there, that does seem really slow, which build are you running? I caught this post on Friday and have been taking a look at the speed and done a lot of optimization in the GitHub build since. There’s a lot of stuff that the codebase is managing such as the lockState of the nodes which I’ve modified now so it’s only managed if your sub-class has it set.

One thing you need to be aware of is that by default there’s a flag set which parses all the curretly available attrs and binds them to the class instance. Now this is purely so that auto-complete by default show all standard attrs on the node, but does slow things down a lot.

r9Meta.MetaClass(’|pCube1’, autofill=‘all’)

If you ran

r9Meta.MetaClass(’|pCube1’, autofill=False)

then that would drastically speed things up.

Also the codebase is more focused at systems management and the idea that a node in a network has a direct correlation to a given class, although it has all the wrapping for standard nodes that you’re looking for. I think there’s still optimization I can do but try the gitHub build, see if it’s moved in the right direction. I just did 10000 cubes in 3sec on this machine so it’s certainly much faster than before.

cheers

Mark

ok so on latest and autofill=False, it went down to 4 seconds for 10000 cubes. I’m going to use this for pretty much every call to ls so i’ll just go with my own wrapping as MetaClass looks to serve a different purpose. Thanks for looking into this, i’m sure i’ll be using some parts of red9 in our pipeline!

Thanks

thats good then, still room for speed improvement though.

The thing is that it’s also checking and caching the mNodes on creation and that’s having to query the existence of our UUID setup. In 2016 it’s slightly easier as Maya manages the uuids for us but basically it means that you always have a single instance of the class object against any mNode instantiated… and I suspect that’s where some of the time is being spent. Might do more digging as we also use meta to manage the simpler things like better attr management etc.

The biggest benefit is that complex data structures such as dics are auto handled and serialized to Json attrs on the nodes, thats saved us so much work in the past.

thanks for testing

Mark