Monday 23 December 2013

Happy Christmas! Early StudioPack v1.41 rc release for testing :)

Well I've been beavering away and thought I'd push the latest release candidate for v1.41 out to the download folder, well it is Christmas (I really should get a life, let the beer commence!)

 This build includes the initial implementation of the new AudioCompiler in the TraxEditor Red9 Sound menu:





This will take either, selected audioNodes or all audioNodes in Maya and compile them into a single wav file. It'll then import this new wav file and activate it. Why, well how many of you have tried to work with facial data and with multiple sound nodes in Maya, then cursed Maya when you try and playblast the scene only to have just 1 of those sounds play. It's a HUGE screw up, something that's been suggested on the Autodesk forums for years.

How the hell do most people work around it?? Well now you can do something about it. This also includes the new timeOffset RMB options in the timeline.

 As always, let me know how you get on.

The build is in the Download folder, follow the download link on the right!

 Happy Christmas

 Mark

Thursday 19 December 2013

Red9 Language packs??






This is great, Red9 in Chinese!! Big thanks to Jerry (sorry I don't know your second name) from the python google groups who sent me this last night. Seems like he's converted all of the Red9 UI's into chinese for his company to use.

Now that kind of begs the question, is multi-language support something others would be interested in? It's easy enough to modify the text in all the UI's to be pointers to a language pack similar to how Maya does it internally, question is, would there be enough call for this?

If you'd be interested let me know

cheers and a happy Christmas

Oh StudioPack v1.41 will be out over the weekend ;)

Mark

Thursday 12 December 2013

Red9 StudioPack - Time and Key Management



Hi all, thought I'd do a new demo to go through some of the new time management tools in the latest build v1.41 which I'll push out sometime over Christmas. Hopefully this all makes sense although there's so much more that I could expose here, just a case of not going to  mad with complex UIs and too many checkboxes.

Anyway, as always all feedback is very welcome

cheers

Mark

Monday 18 November 2013

Red9 Studio Pack v1.40 Released

Well at long last I have a build I'm happy with so here it is, Red9 Studio Pack v1.40. This has been a long time coming and there's a number of posts already which go through the main updates.

If you've not already seen it pop onto Vimeo and watch the update v1.40 video. As usual the download link is off the Google Drive link below. Seems like Google have been playing with GDrive and as always it's totally un-obvious how to actually download a zip file! Open the link, when it pops up there's now a download arrow bottom right next to the open button.

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

At some point I'll get round to doing a proper Red9 web site with download links. I also keep meaning to move to a GIT repository to give you all access to all the commits.

Anyway as always, any issues or feedback mail me. If you'd like to get involved or are using the pack in production I'd love to hear from you. There's a lot of stuff under the hood which can easily be exploited as I am at work.

cheers

Mark

Tuesday 12 November 2013

Buy me a Beer....

Spotted the new button ;) Well why the hell not, it takes a hell of a lot of effort to keep the project going and lots of evenings and weekends. got to love paypal thanks to all the testers Mark

Tuesday 5 November 2013

Red9 StudioPack v1.40 - update video :)



Well it's nearly time for another release of the pack, this one will be a big one as there's been a hell of a lot of development behind the scenes to optimize and streamline the workflows. Thought I'd do an update video as it's far easier than trying to write it all down!

Highlights of v1.40:

  • New - 'Use Priority as SnapList' in the hierarchy tab. This is THE biggest upgrade for a while, see the video as this is a massive optimization and gets over a ton of issues.
  • New Presets in the hierarchy for Stewart, TSM and Andy rigs - these need testing.
  • Object and CharacterSets are now handled like any other hierarchy in the filters.
  • Red9 HUD integration in the channelBox has been upgraded and now supports both simple Hud elements and sliders.
  • Pose Relative upgraded to support the new Snap methods
  • SnapTransforms now upgraded to support the new Snap methods
  • Track N Stabilize upgraded, now supports separated trans and rots in the tracker. 
  • SnapTransforms plugin now takes tran and rot flags
  • More functionality in the InteractiveCurve UI
  • MirrorUI upgraded, now allows a pre-clear when loading mirrorMaps.


Hopefully I'll be pushing this pack out in the next week or so

cheers

Mark


Wednesday 30 October 2013

God Damned ANIM LAYERS!!!

So all animators love the animLayers in Maya right, the problem is that from a pipeline point of view they're an utter cluster fuck!

I've been doing some serious optimizations to the snapTransforms code in the pack, you can now use the filterPriorities list in the hierarchy tab as a list of nodes which will be snapped during the process. Let me explain, you have feet, wrists and COG all in the same space, normally parented under a global rig controller. Now all other controllers in rigs are normally children of these, or at least children of a subset of nodes. Ie, your head controller is a child of the shoulders, so as long as the shoulders are in the correct space, then the data on the head should just be able to be copied over, no need to run a snap..

In the current build I pass all nodes returned from the hierarchy filter to the snap list, so even things like fingers would be on it, makes no sense. It's also something we were doing at Eurocom for years to speed up snapping rig animations.

So cutting to the point, this all works and I've tried it on a Morpheus sequence, over a 100frames it was just over 10 times faster, yippee!!!! Except one of the animators at work found an issue that arises in this logic from animLayers.

There is currently no code to copyKeys in Maya that respects animLayers, all you get are the current active animLayer keys copied over, which now means if you've got adjustment layers on your nodes I can no longer rely on being able to just copyKey data on subNodes as layers gets in the way.

Think a warning dialogue will have to do for the time being, I'm looking at teaching the Red9.copyKeys about layers, either have it flatten them automagically or rebuild them on the destination nodes

Mark

Monday 30 September 2013

Gearing up for v1.34

Well there's a been a lot of development behind the scenes on the StudioPack recently, lots of fixes and a few new features going in.

MetaData has had a lot of speed up work to support Morpheus2 better and the insane amount of metaNodes that Josh has crafted around it. I'm also working with him to integrate the poseSaver in his meta structures which will mean all Morpheus2 users will get full access to all the hidden goodies in the AnimUI.

A few new bits have gone in by request:

  • Track and Stabilize now has 2 new checkBoxes to isolate the track to 'rots' or 'trans', these flags are exposed via the SnapTransforms plugin so can be expanded elsewhere. 
  • Tracker also now has forward / back buttons saving you having to set the step to -1 to go backwards.
  • PoseSaver (when running metaRig) now has the option to maintain any parent switches. Basically whatever space you have your parent switches set to are respected during the poseLoad. This means for example you could have stored the pose with your wrists set to be in 'HIP' space but want to load the pose with the wrists now set to 'WORLD'... this is now recalculated so the pose loads correctly and maintains the new parent space settings.


There's also been a lot of extra work done to expose more functions to the metaRig, again, gearing up for a good Morpheus integrate.

Still looking for more testers and feedback. I'd also love to compile a list of users, particularly studios using the setups so feel free to drop me a mail, I'd love your feedback!

cheers

Mark

Tuesday 20 August 2013

Interactive FilterCurve update Vimeo



Just a quick update to the Interactive FilterCurve Tool in the StudioPack based on a ton of feedback from a good friend of mine running it in production, cheers Santi ;)

Resample has been added to the tool so that you can resample, interactively over time, effectively baking your data down interactively. The Filter now also has a clamp to frame option so you end with whole frames rather than subframes.

Thanks for all the support

Mark

Friday 9 August 2013

Red9 MetaData Part 4!!!!



At last!!!!

This one's a long time coming and requested by lots of people so... here it is, hope to god it makes sense!

Last part in the MetaData series, this one delves deep into subClassing Red9_Meta in your own classes. It goes through how to register those classes to Red9Meta registry, pointers as to what to overload, and the crucial __bindData__ func that controls how, and what attrs get initialized on the class node when it's created.

This hopefully completes the MetaData series, 4 long videos where I try and explain the concept and functions behind the Red9 MetaData api. If you've not already watched the first 3 parts check them out on Vimeo.

As usual please feel free to ask if you have any questions or want any pointers. There's a TON of stuff in there under the hood!

cheers

Mark

Monday 29 July 2013

Red9 Studio Pack v1.33 Released!

Well after a lot of  work I've finally got this release nailed down. This is a crucial release for anybody running Maya 2014 as it fixes some really nasty hard Maya crash issues that were happening with the PoseSaver UI. This build also includes a lot of updates to the interactive animCurve filter setup which seems to have gone down really well.

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

As always, any bugs or feedback is most welcome

cheers

Mark

Wednesday 24 July 2013

Maya 2014!!! Crash bug caught

I got back from holiday earlier on this week to a few mails from people running the pack under 2014 and having issues with the poseSaver crashing Maya. It's taken a while to track down but in the latest Release Candidate (1.33) I've patched it. It looks like Autodesk have been tinkering under the hood and how I was building the popup menu for the poseSaver was crashing Maya when the poseLib was refreshed. This new build also has extended functionality to the FilterCurve setup making it way more powerful, I've added an interactive resample curve option as well as a clamp that will clamp the resulting keys to whole frames. This still isn't a full release, the changes I've made to by-pass the bug need a bit more testing but please feel free to grab it from my download link and test it out. The more feedback the better. thanks Mark

Friday 28 June 2013

New Interactive Curve Filter and Randomizer UI's



A Vimeo demo of 2 new anim UI's designed for anybody dealing with dense baked data such as MoCap or wanting to add some random noise into anim data.

 The InteractiveSimplifyUI is basically a smart wrapper over Maya's internal simply command, anybody who's ever used the default tool will know how basic and un-user friendly it is. This deals with that issue by giving you interactive key reduction. Unlike the default Maya implementation this also allows you to reduce just selected keys.

 The Randomizer is another anim curve manipulation function, designed to allow you to add controlled noise into anim data. This went into a previous build but has had a face lift and been made interactive as well.

 This demo was done on a test build so the UI's may expand a little by the time they hit a release.

As always, all suggestions are welcomed

Mark

Monday 10 June 2013

New Features on the way!

A few new features coming up!
Firstly I've added a new option in the CopyKeys block in the UI, 'pasteBy'. This is something that's been requested a few times. It's gives you access to all the standard Maya paste methods when copying keys, this is used not just by the CopyKeys function but also by all calls in the UI that use a copy method, including the SnapTransforms and the MirrorAnimation.



 Next up changes to the pose code to make it easier for people to use internally. I've changed the main poseLoad and poseSave calls such that they no longer require a filepath. If the path is left off then the pose is simply cached on the current poseClass object. To better access this I've added handling in the metaRig to do all of this for you!

#get current metaRig
mRig=r9Meta.getMetaNodes(mTypes=r9Meta.MetaRig)[0]
#cache it's current pose
mRig.poseCacheStore()
#load that cache back
mRig.poseCacheLoad()

Now that's really simple, but what I've also done is to allow you to specify an attr in this call, if given the pose is serialized to that attr on the mNode itself, storing the pose internally on the object! We do this at work to store the zeroPose for our rig, caching the initial state of every controller in one go. Actually we were also doing this back at Eurocom and I've been meaning to add this feature for a while.
mRig=r9Meta.getMetaNodes(mTypes=r9Meta.MetaRig)[0]

#serialize the pose to a given attr (created if not found)
mRig.poseCacheStore(attr='zeroPose')

mRig.poseCacheLoad(attr='zeroPose')

Hopefully this makes pose handling a lot easier for everybody to access. I've been doing a lot of smaller changes under the hood too... Things like a white space strip for the filter calls which was previously lacking. I've also made the AnimUI scale correctly!

Lastly the pack is about to go out under a GPL license, something I need to do for work as well as for the general public.... I want spell it out to all that the pack is intended to be used for everybodies benefit..not just Crytek and those willing to put in a bit of time testing it ;)

Anyway, keep the suggestions coming.

cheers

Mark

Sunday 26 May 2013

Red9 StudioPack v1.31 released!

Just a quick note on a sunny bank holiday to say I've just released the latest build, v1.31.

This is updated in all the usual places, my Google drive as linked in the download section, CreativeCrash and Autodesk Exchange (although that will take longer as it has to go via Autodesk to release the package).

This is the build with all the poseSaver updates and the new Sound menu in Trax to manage audio in a far more seamless manner inside Maya.

 As always all comments and feedback are welcomed

thanks

 Mark

Tuesday 21 May 2013

Red9 v1.31 - new Sound Menu

Just a really quick one to show you something that's gone in in the latest build (which I'll push out over the weekend). I've added Sound support to the TraxMenu as below. Nothing too special just a lot of useful small functions when dealing with audio in Maya.


I've been in Trax a lot recently purely because I'm getting facial lipSync setups sorted at work so am always messing around with audio. I was getting really frustrated, not just because in Maya2013 you CAN'T DELETE bloody audio from there any more! Features on this:


  • Delete selected - obvious one, delete selected audio nodes - gets over the bug in 2013 where tyou can't delete them unless you do it in the Outliner
  • Activate Selected Audio - pushes the selected audio node onto the timeline and turns it to be the active one, frustrating there isn't something like this already!
  • Set Timeline to Selected: works on multiple audio's, sets the timeline to the boundaries of the selected AUDIO nodes
  • Mute/unMute - obvious
  • Open Audio Path - open up the selected wav file source folder in explorer (linux/MacOS supported too)


Anyway, if anybody has any suggestions let me know, otherwise I'll ship this build as it is

cheers

Mark

Thursday 16 May 2013

PoseSaver on Steroids!




Another Vimeo demo added, this one goes through the more advanced features in the Red9 PoseSaver, features aimed at giving the more technical among you access to expand and modify it's behavior on the fly. We use some of these features internally at work to tailor the behavior of specific folders, allowing us to store facial and finger data which need additional logic. I also go through the PoseCompare and hopefully shed a little more light on the filterPriorities and their relevance when loading relative poses.

This is build v1.31 which I'll release sometime over the weekend. For those of you following Red9 on Facebook you'll also have seen that the new pack includes Audio support via a new menu in the TraxEditor. I'm sick to death of Maya2013 not letting us delete sound from Trax so thought I'd add a few features to teh pack, including a few very simple but useful sound tools.

Still looking for more testers so if you want to get involved drop me a mail

cheers

Mark

Monday 29 April 2013

MetaHUD - Monitoring any attrs in the Maya viewport - ChannelBox integration



And another Vimeo!

This one goes through the MetaHud node integration that's now on the popup menu in the ChannelBox. Really useful for debugging setups and monitoring data inside your rigs. The idea is really simple, it's makes a simple metaNode who's attributes are all monitored, all I do is add attrs to that node and connect those attrs up to the data I want them to monitor. Because it's a node you can wire this up to your rig and have it live there, monitoring any data you may need when debugging.

Still work in progress so any suggestions are more than welcome!

cheers
Mark

Wednesday 17 April 2013

Red9 MetaData Part3



Red9 MetaData Part 3! 

Third part in the MetaData series, this one starts to show you how to wire up a rig with the metaData backend

Any questions let me know

Mark

Wednesday 10 April 2013

Red9 StudioPack v1.30 Released!

As per the previous post really, I've just release StudioPack v1.30 with a ton of fixes and updates. Been working on the ChannelBox RMB HUD integration, this is still kind of work in progress but it's been so useful at work that I couldn't resist pushing it into the build. Thanks again Mark

Tuesday 9 April 2013

Red9 Studio Pack Release 1.30

I'm gearing up for a new release v1.30 and thought I'd preempt it by pushing the latest change log out so you can see what to expect.
There's a ton of fixes and upgrades to a lot of the core code, if you're running metaData then I advice you take a look. There's also some neat new features gone in such as the RMB channelBox HUD integration for monitoring attrs in the Maya viewport. The PoseSaver has also had some core upgrades and now supports sub-folder poseHandler files for modifying the pose behaviour on a folder by folder basis.

This will probably go live in the next week

thanks for all the support

Mark

1.291:
------

  • Fix - Red9_Meta - type 'unicode' value's weren't being supported correctly in the setAttr func
  • Fix - Red9_Anim - MirrorSetup - loadMirror was failing to load custom Axis correctly.


1.292:
------

  • Fix - Red9_Meta - isChildNode() wasn't dealing with longNames correctly
  • Mod - Red9_PoseSaver - batchPatchPoses() modified to make it more flexible. added arg to stop it always resaving the pose after patchfunc has been run. also now passing poseFile back into patchfunc
  • New - Red9_PoseSaver - poseHandler.py support added! - This is a BIG deal for TD's out there as it gives you access to all the internal node handling at a sub-folder level. Allows you to fully customize the pose behaviour on a folder basis!
  • Fix - Red9_Anim - PoseUI wasn't remembering the last subFolderyou were in.


1.293:
------

  • New - Red9_Anim - PoseUI now has a RMB Make Directory call
  • New - Red9_Anim - PoseUI now has a 'Debug:Copy poseHandler.py to Folder'. This is an avanced option for by-passing the node handlers on a folder by folder basis!
  • Mod - Red9_Anim - 'Ctrl' click when launching the AnimationUI will boot it non-docked
  • Mod - Red9_Meta - Calls that previously only took an mType/mInstance as a [string] arg now also accept the class too... so r9Meta.getMetaNodes('MetaRig') and r9Meta.getMetaRig(r9Meta.MetaRig) both are accepted.
  • Mod - Red9_Meta - getChildren now takes an additional arg 'cAttrs' which can be used to only return children connected via a given attr name (this uses wildcards and will take a list)


1.294:
------

  • Fix - Red9_Anim - added full traceback to the error handling in the AnimUI
  • Fix - Red9_Meta - added full traceback to the error handling in the nodeLockManager and thus the main class
  • Fix - Red9_Meta - setAttr wasn't raising errors due to the decorator. Patched
  • Mod - Red9_Meta - updated MetaHUD, simplified event handler, now connected to refresh by default
  • New - Red9_Meta - Added HUD wrappers now being called by the ChannelBox RMB menu - gives you access to the MetaHud monitors and makes the setup more integrated


Thursday 28 March 2013

Red9 Module Distribution.....Maya Extensions

I've been talking with Autodesk and it looks like Red9 Studio Pack will be a part of the new Maya Extensions site when it's launched, presumably alongside the release of 2014.

The extensions download and install with an exe which are packaged in line with Maya's modules so there's been a bit of package redesign in order to cope with this. At the moment this redesign is only in the build Autodesk have but I'm wondering what peoples thoughts are about rolling the restructure out for the main build?

What's different?

Not a lot to be honest, the main difference is that the 'startup', 'packages' and 'core' folders would live under a 'Red9/scripts' folder (as defined by the Maya module system design). When setting up the python path you'd point it to Red9/scripts rather than just Red9. Everything else in the systems and the boot would be the same.

Anybody got any thoughts?

Mark

Sunday 24 March 2013

Red9 MetaData Video Part2



Second installment of the MetaData API demo's.

This one gives you an overview of the factory aspect of meta, how it can be used to walk systems and how the attribute handlers are designed to return python objects rather than just Maya nodes.

I'll follow this up with a more detailed breakdown of the metaRig class and handlers, plus more code detail. 

Any questions drop me a mail

cheers

Mark

Wednesday 20 March 2013

PoseSaver - extensions ;)

I'm designing a new setup for the poseSaver to allow you to easily over-load and manage your own node handling within pose folders and was wanting to see if anybody had any feedback on this one...

So the idea is that any folder that the poseSaver points to, be that the main poseFolders or subfolders, can now have a python file in it that over-loads the main getNode handler in the pose function. Why??

Lets say you want to have a folder specifically for facial, and that facial in your rig is managed in a different way, or you would like to modify the filter used to find the nodes. You may even want to pass a node list directly in. At the moment it's hard work and would mean that for each folder/poseType you'd have to either change the rootNode (setRoot) or change the filter.cgf.

The new stuff will make folder type poses a doddle, if the code finds a python file in the folder then that file is passed and used pre the load or save calls. At the moment I expect 2 functions in there:

def poseGetNodesLoad():
 #do your stuff and filtering
 return filteredNodes
 
def poseGetNodesSave():
 #do your stuff and filtering
 return filteredNodes

These functions are run before the pose handler so you also would have the opportunity to do any file modifications in order to get the scene into the correct state for the pose functions. I may also support a teardown() function just in case you needed to do temp modification's that needed returning after the save or load call.

Anybody got any further thoughts on this? I'm thinking this would give you full control and it would make the systems far more open and customization

cheers

Mark

Friday 15 March 2013

Red9 MetaData API - Vimeo Part1




Red9 MetaData API Part1: 

This is the first of what will be a series of videos that go through the MetaData API concepts in Red9. This first demo goes into the attribute management of the class, how it can be used to easily manage, add, set and get any attr for any node inside Maya in a completely seamless Python manor.  The next few videos will delve into the more complex network structures designed with MetaRig and go through the factory class aspects of the api. The last in the series will show you how to subclass Meta for your own usage and why you'd want to..

Any questions fire away

cheers

Mark

Wednesday 6 March 2013

Red9 - StudioPack v1.29 released!

Just a quick note to say I've finally released StudioPack v1.29. Follow the Download link to the right to get to my Google docs folder or go to CreativeCrash to grab it.

The main changes are already discussed below in a previous thread, but here's a quick list:

  • CameraTracker - new feature for tracking animated objects in the current view - see Vimeo demo
  • PoseSaver updates - now supports SubFolders both in local and project - the sync allows poses to be synced and folder sub-structures generated if they're not found
  • Most of the UI's now have a 'VimeoHelp' menu that takes you straight to the video demo. I'm trying to do one of these per tool so you have full interactive help on everything.

More detailed changeLog:
  • - Red9_Anim - PoseLib now supports subfolders in the UI
  • - Red9_Anim - CameraTracker now in the Red9 Menu - generates an auto tracked, or panned, camera focusing on the selected node - very usefuyl for visualising moCap
  • - Red9_Meta - metaHUDNode gone in - designed as a debug tool to enable you to easily monitor attributes in a managed HUD in the Maya viewports. Any attrs added to the mNode is monitored and added to the drawHud call. This is work in progress
  • - Red9_Anim - AnimtionFunctions now has a function for bindNodes, uses the same filtering and matching setups as all the rest of the code and allows you to bind full filtered hierarchies together, either direct connects or parentConstraints
  • - Red9_Anim - All animFunctions now accept matchMethod as an arg, this allows you to either accept 'prefix stripping' in any node matches or use 'base' = name for name exact match.
  • - Red9_Anim - PoseLib subfolders bug fixes so that you can sync subfolders to project libraries with the 'CopyLocal>>Project Pose' RMB call. This makes the missing subFolder if it's missing in the Project structure
  • - Red9_General - Timer decorator now shows module/class and func in the report feedback
  • - Red9_Meta - Added **KWS update support to the addAttr call, if the attr exists and you've passed in kws then these will get synced and updated if in the internal 'valid edit kws' list. Great for use in the __bindData__ call to sync properties.
  • - Red9_Core - Added more logic to the main MatchedNodeInputs call. Now allows you to pass in 2 hierarchies directly for processing. This means you can by-pass the filter processing in all animation Functions and pass 2 hierarchies directly in for processing!
I've also added a build ID number in the Details UI so you can track the build version internally.

There's tons more coming, thanks for all the support

Mark


Monday 4 March 2013

CameraTracker Vimeo



New CameraTracker Vimeo added, this is a really simple but useful little function for isolating motion when animating by tracking selected nodes with the current camera. This is going into the next release which will be in the next week or so, it's in testing at the moment.

Something I missed off was that the timerange the tracker uses is the same as all the other Red9 functions, either the current playback range OR your selected frameRange, highlighted in Red on the timeline.

cheers

Mark

Sunday 24 February 2013

New Facebook Page!

I thought I'd put a Facebook page out there as an easier way to get comments and feedback. This blog will always be the main source for updates and code snippets etc, but I figure a general Facepage could also be very useful for many. Great suggestion Josh by the way.... so here it is:

http://www.facebook.com/Red9StudioPack

Thanks for all the support

Mark

Friday 22 February 2013

New Features Coming soon!!

Well I've been busy over the last few nights trying to get a ton of updates into the pack.

PoseSaver now supports SubFolders:




SubFolders will switch the UI to display all child folders from the current PosePath, ie, PosePath/subFolders, selecting any of these will switch the UI to show poses in the chosen subFolder. I've clamped it to a single child folder as I really didn't want this UI to get out of hand. I guess it could expand with double click and single click commands but let's see how we get on. The Clear button will clear the subFolder text and thus return you to the root folder poses.

CameraTracker:
Also added is a tool that I used to death at Eurocom, an automated cameraTracker. This is great for moCap deliveries as it means you can just select a controller, or mesh and have the camera track the motion, saves continually shifting cameras to see deliveries. It's also great for seeing things like walk and run loops on the spot or aiming in on facial.


Working process: you select something for the tracker to aim at and choose either panning or tracking camera. The code will use the current camera in the current modelling panel and track the selected over time. As with all the Red9 code timeRange is either the current playback timerange, OR the area in the timeslider highlighted in Red. Tracking moves the camera, panning leaves it where it is and just aims at. This is a really simple bit of code, all it's doing is hacking into Maya's viewFit calls, the same thing you do when you hit the 'F' key. The option box lets you set the framestep used between samples.

Code Cleanups:
The AnimationFunctions class now takes a matchMethod arg which switches how nodes are matched during node processing. By default when it tries matching nodes in 2 hierarchy it allows prefixes, so SID_L_Wrist will match L_Wrist. I do a test to see if either name ends with the other, if it does it's considered a match. Now this can fall down if you have similarly named nodes in a hiererchy, like in facial you may have L_LowerLip and L_LowerLip_f, now these technically in the current setting will clash and may give unwanted results. So the arg flag is there to modify this. I've not yet exposed it to the UI but may add a settings optionBox in there somewhere to allow you to modify this flag.

 Note: the PoseSaver code already uses a more precise node match.

This new build is in testing at the moment

cheers

Mark

Friday 15 February 2013

MetaData....the what and the why?

Before I go and do a new set of Vimeo vid's on the MetaClass API in Red9 I thought I'd go through a few of the basics. This is kind of triggered from a few mails I've had from people asking what the concept behind the MetaData API is and how it might benefit them. MetaData is nothing more than an API, how you use it is down to you...


Part1 -The Factory:

So in a nut shell, it's a factory class with very careful over-loading of some of the key Python calls. The factory stuff really isn't that complex. It's one of those concepts that sounds hard but actually it's really simple. The idea with mine is that any Maya node with an 'mClass' attribute on it, where that attr value matches a pre-registered class, will return that class in all the get() calls in the api ..... example:


  • 'myNode' has an attribute called 'mClass' who's value is 'metaRig' 
  • 'metaRig' is a registered class that inherits from r9Meta.MetaClass 
  • metaRig class is automatically registered to the systems by an internal function that maps all inheritances from MetaClass r9Meta.registerMClassInheritanceMapping()  

The factory part of meta goes like this:


  • r9Meta.getMetaNodes() or r9Meta.getConnectedMetaNodes() will look first for nodes that have the mClass attribute on them. The search is clamped to registered nodeTypes managed by a call that can be run to register any nodeType to the systems so you can expand as needed.
  • resulting nodes are passed in to the __new__() of MetaClass 
  • the mClass attr 'metaRig' is matched to the registered class 
  • that class is instantiated and returned back to you 

So what???????? Well imagine you do getMetaNodes() on your rig scene that has an mRig node 

mRig=r9meta.getMetaNodes(cmds.ls(sl=True)[0])[0] 

 Now mRig is a class object of type 'metaRig' and that is a subclass of Meta so has all the attribute handlers available. Basically that Maya node is now bound to a given class like Pymel does, you do pm.selected() on a transform you get back a pymel.Transform class object, you do the same on a light....etc. Well in the same way MetaClass does the same for any Maya nodes. More importantly by subclassing MetaClass you can bind your own classes up to your own nodes in any system.

So lets quickly look at the metaRig setup in the Red9 unitTests:


#cast the MayaNode to a metaRig object
mRig=r9Meta.MetaClass('RED_Rig')
assert mRig.L_ArmSystem.L_ArmSupport.mNode=='L_ArmSupport'
assert mRig.L_ArmSystem.L_ArmSupport.SUP_IKHandle[0]=='|World_Ctrl|L_Wrist_Ctrl|ikHandle1'

Note here that I can just use dot complete to actually walk the metaRig network. This is because by getting the attribute of type message the code looks at the linked nodes, if they too have the mClass attr they are returned as python metaClass objects too, so you can just keep walking down the tree. This makes finding nodes in complex systems like rigs an absolute doddle.

Part2 -Attribute Handlers:

So above we saw that metaClass gives you the ability to turn any Maya node into a class bound to that node, so what? Well in the rigs case it means that we can get data dead easily. This is because I've also very carefully managed all attribute calls via the MetaClass api. In doing the mRig.L_ArmSystem call above the code first tests the type of attribute, in this case a message, and uses the listConnections call to get back the data.

The attribute handlers in Meta seamlessly deal with getAttr, setAttr and addAttr, in fact addAttr manages all the flags for you, you can even add the attr without telling it the type, I derive it from the value you pass in if I can. Also you can pass ANY node into the MetaClass api, the node doesn't have to take advantage of the factory stuff, you can just use it as an attribute handler if you like. 
Hint: When a node is passed into MetaClass all attributes show on the dot-compete in the script editor ;).

Currently I support:

  • floats 
  • doubles
  • ints
  • bools
  • strings    ( automatically serializes and deserializes to JSON if the value is complex)
  • enums    ( allows you to set the data via the int or string representation )
  • message ( get runs listConnections, returning mClass objects if found, set will automatically connect)
  • doubleArrays (sets the structures up for you when adding)
  • double3
  • float3 

Even better, and here's where it gets fun, if you pass a python dict, or complex structure to a string attr, it's serialized and stored via JSON for you. Here at work we store our zero pose, generated by the
poseSaver, actually on the mRig node itself as a json string. Same way that the SceneReview serializing all the comment data from an internal dict straight to the 'time1' node in Maya. The AttrMap is also doing this when you serializeToNode.


Part3 - The Big One!

 The big one though is this..... any node in Maya that has the mClass attr, that is valid, will give you back the correct class automatically! You don't have to worry about what class to call, what function is in what class and if node==this do that, elif to this.... the node comes back as the correct Python object ready for you without any work. There is a direct correlation between the MayaNode and the class that manages it, like Pymel all the functions you may need, code in the class for that node. It keeps code clean and means that by subclassing you get all functionality for all similar node types for free, and get access to all the core stuff in Meta....which is expanding fast.

I've added a ton of hooks in there recently as I've been working with Josh Burton on the new Morpheus project. These all allow you to sub-class and register new types a lot easier. Most of the code we now write at work is based on Meta, either because it's so easy to get data and attributes back, or because we have many nodes for many reasons, facialRig, supportNodes, exportTags managing systems....

Hope that helps a little?

Have a read of the unitTests and examples folders in the Red9 pack, they're there for a reason and might shed some light on all of this ;)

Mark

Friday 1 February 2013

LockChannlesUI and AttrMaps

Another Vimeo video! This one goes through the LockChannelsUI which is fairly self explanatory hopefully. It also covers the concept of the AttrMap which for riggers is a godsend, a way of storing out the status of every channel in a hierarchy and restoring it when needed. The attrMap can be stored to file OR serialized to a node on the rig itself!

 

cheers

Mark

Monday 21 January 2013

Red9 Studio Pack v1.28 Released - MirrorSetups

Just a quick note to say that I've just updated the download lists to the latest build v1.28. See previous posts about the updates.

I've also added a new MirrorSetup UI for setting up the Mirror Markers and added a Vimeo demo of the setup.

 

 Enjoy!

Mark

Friday 11 January 2013

SceneRestoreContext context manager for your viewports

Thought I'd breifly go through the SceneRestoreContext manager in the Red9.General module as it's something that came up today at work. So what is it, well it's a context manager that 's designed to store, and restore all your viewport settings including:

  • all viewport display options and shading states(for all 4 modelPanels)
  • playbackOptions including units, times, timeranges and settings 
  • scene units
  • current audio set in the timeline and it's active state
  • current main camera settings (tranforms)
  • cameras active in all the modelPanels 

Basically just about everything there is that makes that current session look as it does. Why?? Well sometimes when you're processing data you want to do things to the scene which you really want to restore afterwards. Lets say you're batching a ton of anim data, opening files, switching cameras etc and at the end of processing you want the scene to be set back to how it was. Now this isn't a scene load, this is a cache of all the main ui element settings.

This can be run in 2 ways, the best is to use it as designed, as a context manager:

import Red9_General as r9Gen
with r9Gen.SceneRestoreContext:
    do your code here

Now anybody who's used context managers in Python will get the syntax here. The 'with' is doing all the work for you. On entering the call it runs the internal __enter__ call, then runs everything inside the tab (your code), then when complete runs the internal __exit__ call. The great thing about context managers is that even if your code bombs, the __exit__ will still get called and the scene restored to it's cached state.

You can of course use it as you want, so you can take an instance of the object, run the store then when you need to, run the restore:

store=r9General.SceneRestoreContext()
store.storeSettings()

do your code here

store.restoreSettings()

it's just a function call at the end of the day and might prove useful to others whilst designing tools. If you find anything that you think this is not catching let me know. There's also an AnimationContext thats used in all the animation tools and a HIKContext for managing the set state of HIK rig nodes.

cheers

Mark

Tuesday 8 January 2013

StudioPack V1.28

Well after the StudioPack v1.27 release at Christmas there have been a few important bug fixes I've caught in the setups. In the current build there's a bug which prevents the SceneReporter from opening properly, I'd made some last minute changes to MetaData that the unit-tests didn't pickup. Also a few extra unexpected issues in the animation setups which were picked up whilst I was doing the walk through video. These are now patched and I'll push the new build out later this week hopefully.

I've also added a ton of extra wrapping to the Meta Api and Pose libraries which will make it easier for those of you wanting to use meta to expand it for your own purposes. Have to say a big thank you to Josh Burton from CGMonks/Morpheus Kickstarter for all the nagging and pushing he's been doing as it's really helped expand and stabilize the api. This new build has many extra tweaks to the way attrs are handled, particularly enum attrs. I've also done some restructuring which again, is aimed at allowing you more flexibility to inherit and over-load some of the key functionality.

thanks for all the support

Mark

Tuesday 1 January 2013

Another Video, this one explains the filterHierarchy

 And another video, this one follows on from the AnimationUI demo and takes you through the crucial filterHierarchy control in Tab2. This shows you how to tailor the systems for your rig, how to search for specific nodes in a hierarchy and how to setup the filter priorities list.

One thing I didn't run through was how to tweak the filter once saved by RMB clicking on the newly saved preset and opening up the cfg file itself. You'll notice for example in the Morpheus preset that the name search had regex clamps on the list, these were just manually edited after I'd made filter to ensure that the name pattern search didn't include namespaces and was clamped to the end of the string name.... see regex explanations, here's a great reference:

http://docs.activestate.com/komodo/4.4/regex-intro.html

cheers

 Mark