Showing posts with label NodeSearch. Show all posts
Showing posts with label NodeSearch. Show all posts

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

Thursday, 29 November 2012

The power of the FilterSettings class

One of the guys from work asked me about this today and I thought I'd post it up here to show you just how you can use the power of the settings object to filter and organize nodes in Maya. In this example we have 2 rigs in the scene and I want to run a function that will scan both hierarchies for nurbsCurves who's name contains 'Ctrl' and match the nodes, then process the matches in pairs. filterSettings is a class designed specifically just to hold a set of args to be passed into the main filters, it's what the presets in the Hierarchy tab use and store for you.

Here we have the 2 Top nodes of both hierarchies selected. This is the CORE FUNCTION of the entire AnimationUI, it's how it processes matched pairs into something usable for the code:

import Red9.core.Red9_CoreUtils as r9Core

#make a settings object and set the internal filter types
filter=r9Core.FilterNode_Settings()
filter.nodeTypes='nurbsCurve'
filter.searchPattern='Ctrl'

#use the processMatchedNodes call to do all the work for you!
matched=r9Core.processMatchedNodes(cmds.ls(sl=True),filterSettings=filter)

#matched is an object which contains MatchedPairs, a list of tuples in
#the form [(source, destination)] This in turn lets us unpack the
#data in one go for processing
for source,dest in matched.MatchedPairs:
 print source
 print dest
The same filter can be passed into most of the Red9 functions and is used extensively across all the code. For example the above code is filtering hierarchies, so if we just wanted to search a single hierarchy we can pass the same filter to the FilterNode class:
filterNode=r9Core.FilterNode(cmds.ls(sl=True),filterSettings=fSet)
filterNode.ProcessFilter()
This is again a key concept in the entire pack so worth looking at if you're intending to use the code. 

cheers

Red

Thursday, 22 December 2011

Rig Handling: Another Day Another Video



Well hopefully this will explain the Rig Handling a little better within the systems. The main thing to understand is what and how the hierarchy filters in the Red9 pack do. These are extremely powerful filters that run in unison to pinpoint nodes within a hierarchy structure based on nodeTypes, nodeAttributes and nodeNames (this one is a RegEx search string). This is an intersection search. The idea is that to properly transfer data between complex rigs we need to be able to identify the nodes to be processed within those systems. Note that these filters will processes from a selected RootNode OR from CharacterSets and SelectionSets!

The behaviour of all the Hierarchy checkboxes in the main AnimationUI are controlled by these filters. There's a few presets to get you started, filters can be made, tested and stored. If you don't want to get too technical then for rigs just used the Standard Rig preset. This will filter the hierarchy for nurbsCurve based controllers.

This also goes through the various methods of transferring animation and pose data between animation rigs.

Big thanks to Nigel and the guys at MotionCircus for letting me test this out on one of their production rigs.





Wednesday, 3 November 2010

Beta1 now released

New Beta is now up linked off the download post. With this comes a much easier setup and a few new goodies. The install will now mount a new menu for you at the top of Maya menu's linking to the Python UI's. Demo videos are nearly ready to go up that will explain things a lot easier as theres a lot of functionality behind these toolkits!

New stuff:

  • There's now a handy new ToolKit for managing the keyability and visibility of Translate, Rotate and Scale channels on mass for a complete node hierarchy

  • The SearchUI has been modified to try and simplify it a little, the 3 filter parts hopefully make more sense now.
  • The AnimationUI now has a ton of fixes in it and a new TimeOffset tool for managing time either at a scene level, or on selected nodes. These nodes can be either transforms, sound, clips, all are dealt with at the same time.
As always all comments and requests are always welcome