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.




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:


do your code here


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.



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


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: