Friday, 28 September 2012

MetaClass : More attribute handlers added

I'm expanding the attribute Handling in the base MetaClass as some of the examples in the unittests made no sense to me. For example if I did the following I'd get the color values back from the compound float3 attribute but I couldn't set them:
mLambert=r9Meta.MetaClass('lambert1')
mLambert.color  #Result [(1.0, 1.0, 0.0)]
In fact the whole way Maya cmds wraps the handling of compound attributes is crap! So I've wrapped them in the latest dev build and to me, they make a lot more sense than default Maya, you can now simply do:
mLambert.color=(1,0.2,0.2)
and the compound3 attribute will be set correctly, the value accepts either a list or tuple with 3 values, any less will raise a managed ValueError.

Also in the new build, v1.26 the messageLink handling in the base class was upgraded so that setting message links, either multi or non-multi is now a simple case of:
mNode.myMessageAttr=['newLinkA','newLinkB']
If the attribute already has connections those are disconnected and the relevant attrs deleted on the old connected nodes. Again as I'm going through this and more people are feeding back I'm gradually expanding the MetaClass base. If you find any more issues with the attribute handlers let me know

Oh and in the current build of v1.26 the presets in the AnimationUI fail to manage the metaRig checkbox and  are a little bit flaky, this is fixed, just got to update the server.
cheers

Red

Saturday, 22 September 2012

Red9 Studio Pack v1.26 - released!!

Well it's finally tested and out, see download folder for the zip.

 Enjoy

 Red

Friday, 21 September 2012

Almost there.... v1.26 in testing

Now a Python Site-Package
Well I'm just tidying up a few loose ends before getting a new version ready for release. This is a BIG update with a lot of fixes so bear with me: The big change is that the systems no longer support the Maya module system, instead I've made it a proper Python site-package which makes it lots easier in many ways, it's also something that had been requested by a few people. I've updated all the docs to reflect this.

Main updates in Studio Pack v1.26:
MetaData has been fleshed out hugely since the last release, lots of additions and much better attribute handling across the board. There's a few good test examples that I'll ship which should take you through the MetaData basics. This is the core of the updates and has taken a lot time to nail down. It's also now threaded into the main UI's and FilterNode calls.

MetaData NodeUI: Added a new MetaData nodeUI for managing and finding MetaData in your scene. This has a RMB menu for filtering for specific class nodes.

Mirroring of Animation and poses is now supported via the MetaRig. This rely's on markers laid down when adding a MetaRig solution to your setups. I may in the future make this more accessible to non-coders and add a MetaRig UI for binding your rigs to the setups.

MouseMoCap: New RecordAttrsUI added in the menu which allows you to marker channels in the channelBox for recording, when you hit the record, the timeline is played and all changes to those attributes recorded and turned into keys.

Fixes:
CodeInspector in the ScriptEditor RMB menu now runs correctly from text selected in both the executer and reporter dialogues. I've also made this cross platform so hopefully the history inspect should run on Mac and Linux now. I'm testing a module called pyperclip which seems to do the job fine. The only limitation at the moment is that I'm doing an os.start(path) on the path I find and if you have Python installed, the default is to open the file in the standard Python shell rather than your editor. Trying to think of the best way to handle this limitation. Suggestions welcomed!

The timeOffset of animation on selected nodes would fail if you had AnimationLayers, this should now be fixed.

MetaData allows you to inherit from the MetaClass in your own code and have that code registered inside the systems. This will be explained in the examples that go out with the release.

cheers

Red


Wednesday, 5 September 2012

A few pointers for the new release


Red9 Studio Pack v1.26 is in testing at the moment with a few major upgrades.

Firstly it includes the upgraded MetaData systems, all of which are now integrated into the main AnimationUI calls, these hooks need testing but all seems fine so far.
With the MetaData I've also now added full Mirror animation and Pose support, based on the data that you bind up to the MetaData when it's added.
It also includes a MouseMoCap UI, something that somebody was requesting on one of the forums. It just lets you hook channels up from the channels box for record, then you hit the record button and any changes made to those channels get converted into keydata.

So a few pointers that have come up, be good to get others feedback on this stuff. These are comments on the api and code.

Question: * I'd somehow prefer it if mirrorData was a class/object
Yeah I kind of know what you mean. I was thinking of just a simple verified dict class that forces you to add
the correct data and pass that to the MirrorData arg. I guess I wanted to keep it simple when adding the metaData rather than having to make sure you build and pass in a mirrorClass settings object. The MirrorData ultimately gets built into a class when it's used by the r9Anim.MirrorHierarchy call, .getMirrorSets() builds the class dictionary up for the mirror sets which aree then processed in the main mirror calls.
One thing to note on this is that if you run without the hierarchy setup, the code will mirror matched pairs if it finds they're selected. Ie, you select left and right Feet, both of which have matching mirror slots, and their data will be exchanged. Now I could also have it search for the relevant matching pair object, so oyou select left and it finds right....not sure really. That might just be another wrapper call. Also if you have any center controls selected they're axis would be inverted.
Finally one thing I'm kind of stumbling on.... the axis by default works like this...

IF the mirrorAxis attr is found and has data, then those attrs will be inverted during the mirror
IF the mirrorAxis attr is found and has NO data, then no attrs will be inverted
IF the mirrorAxis attr ISNT found, then I use a default set of attrs to inverse

Does that makes sense? or do you think I should just stamp the defaults in the attr if you don't pass any in? That way the attr is always there and whatever it says is used.

Question: * MClassNodeUI().show() does not display sub FACIAL node from example (Doc's say it will display all)
This UI has an arg for mNodeType which by default is set to 'MetaRig' meaning it'll only show metaData nodes of type, maybe this should default to None so it does show all unless you want to filter it? At the moment it's only used by the Pose UI to find MRigs in the scene so you can choose the character to run the data to.

*Question: * The PoseFiles that get saved out currently load using the internal Filter that stored with the pose itself. Should there be an option to use either the internal PoseFilter, or the current UI Filter?
This is one that I'm mulling over at the moment. The backbone of all the systems is the FilterNode, the part that controls what nodes in a hierarchy get processed by all the functions. Now at the moment the Pose Loader uses the internal filter thats stored with the PoseFile. This has caught me out a few times and yes, I'm thinking that maybe there needs to be a flag in the UI to make this more obvious? thoughts??

*Question: *Should there be a UI to add the MetaData markers or do I leave this as a TD code solution?
What I may do is give people a really simple one that supports the predefined control functs (addWristCtrl.. etc) as well as an open add that wraps the main call addRigCtrl(). Not sure if the Mirror UI should be part of this or whether I should separate the UI's? Then again there's no real reason not to run the MetaData as it goves you so much more from a code point of view. Still a few more things to iron out, I want to be able order the ctrls in the dict that comes back, but not sure of the best way to do this at the moment.

Monday, 3 September 2012

Maya2009 - do I drop support?

Maya2009 do I bother????

Up till now I've made the Red9 compatible with Python 2.5 and therefore it'll still run in Maya2009. But with the MetaData setup I'm running the Json module which only came into Python in 2.6. So do I just say fuck it, and drop Maya2009 from support or do I include simpleJson in the packages and run that in case the import of Json failed?

Is anybody still running 2009?