Archive for July, 2012

Mon, Jul 23rd, 2012
posted by jjburton 09:07 AM

Good week last week on the rigger. Plugging along…

cgmToolbox_07232012

Lessons of the week

  1. I’m getting really really good at hard crashing Maya
  2. FrameLayout within a FormLayout no worky.
  3. Instead of being an idiot and reinitializing the same object for multiple classes, just link it
  4. So a pretty big annoyance with instanced gui’s is that they lose direct access to the root maya python space aside from doing a mel.eval. So I think I have a working way to linking to that with a bridge class if you will.
  5. When initializng objects and attributes, if an object is going to have more than one attribute, intialize it as an ObjectFactory instance before passing into into the AttrFactory so each instance of the AttributeFactory is linked back to the base object (in case of name changes). It also enable simple data storing when an ObjectFactory obj is initialized
  6. You can attach ui elements that have to do with a particular instance back to that instance. For example, if I want to connect a text field instance from baseMelUI, I could do self.Module[i].textField = MelTextField(whatever). Then I can call it back from another function as in self.Module[i].textField(edit=True, ***). Nifty 
    1. On second thought, not sure this is a grand idea
  7. Need to ensure to pass through verify functions to children modules
  8. Spent way too much time trying to track down a maya crash bug. I’m not sure why but maya doesn’t seem to like deleting and adding UI elements on the fly as it doesn’t crash till it finishes the functions and is going to update the gui. So instead of that, i’m just sticking with storing vital ui components to dictionaries stored to the gui and indexed to the modules index
  9. BaseMelUI bug – Seems to be an issue with getMenuItems and getSelectedIdx for MelOptionMenu
  10. Need to be careful with Callbacks, shouldn’t pass instances into them that could no longer be valid after a change somewhere else
Notes:
  • General
    • added a connect to wing fuction in the Dev tab
    • Lots of general work with naming
  • AttrFactory
    • Modified to be allowed to pass an ObjectFactory instance through as the object name
    • Changed reporting to generally be shortNames rather than long to make things a bit neater in the script editor
  • ObjectFactory
    • Added option on doName to rename the heirarchy below as well
    • Removed the requirement of an object existing on call, it not creates a null with that name if nothing exists
    • Made you able to pass object factory instances into:
      • doParent
      • copyPivot
      • copyRotateOrder
  • cgm.dictionary
    • added gui DirectionColors
  • ModuleFactory
    • Added forceNew keyword arg to make it add a new one for certain gui fuctions
    • added moduleType as an instanced attr
    • added changeBaseName – module based base name changer
      • Changed changeBaseName(self,string) to a more general version…changeCGMTag(self,tag,string)
    • added setParentModule – connects module to parent module
    • Added masterClass storage
    • Rewrote after discovering better way of passing through ObjectFactory instances to save memory and ease
  • PuppetFactory
    • Functions
      • puppet
        • delete
      • module
        • addModule – updated to work with dict
        • remove
        • delete
        • change tag and rename/reinitaiize
    • Decided to index module instances via their index on the buffer object rather than by name to avoid having to keep checking for name changes.
    • Issues with naming from doing scene unique on some stuff fixed
    • Added changeModuleBaseName function
    • Rewrote after discovering better way of passing through ObjectFactory instances to save memory and ease
  • Limb.module
    • Rewrote after discovering better way of passing through ObjectFactory instances to save memory and ease
    • Added some more default options for Limbs
    • Added master class verify and intialize before doing subclass version
    • Added masterClass storage
  • cgm.puppetBox and cgm.puppetBoxLib
    • Updated add module to work off a simple string
    • Added – uiModuleUpdateFrameLabel(self,index)
    • Added – uiUpdateIntAttrFromField(self,fieldsDict,attrClassInstance,index)
    • Added a delete function to the menu and lib
    • Added verify and initialze functions to gui
    • Reworked the per module stuff to not call instances on callbacks
    • Color change links to direction now
    • Direction and Postion option menu’s work now
  • NameFactory
    • retooled iteration logic to better account for ‘claimed’ iterators
Mon, Jul 16th, 2012
posted by jjburton 08:07 AM

New build for the week. Lots of work last week on the underpinning classes for the new rigger which we’re dubbing ‘cgm.puppetBox’ for now. Need help running down a bug with cgm.setTools. If you have any info on hard mayra crashes stemming from it, please forward as we’re unable to replicate it.

cgmToolbox_07162012

  • cgm.puppetBox
    • Added a frame layout for axis stuff
    • Got modules start
  • AttrFactory
    • Make axis setup work priority wise
    • fixed bug whereby self.children wasn’t declared
    • made doStore set the self.value as well when storing
    • made it properly store a value on initialization if a message attr
    • couple of bug fixes on string formatting
  • NameFactory
    • Fixed returnRawGeneratedName and returnObjectGeneratedNameDict to allow more than one ignore tag
  • cgm.rigging
    • doParentReturnName – added a simple check to see if the object is already parented to avoid maya reporting it
  • BufferFactory
    • removed the cgmType default labeling on call to let this be used with any transform
  • guiFactory
    • Added frame layout to our standared gui templates
    • doPrint ReportStart – added label option to make it clearer in the script edito
  • cgm.search
    • returnRawTagInfo – Removed assertion, cleaned up string formatting because I realize now I was an idiot back when
  • cgm.modules
    • createInfoNull-Fixed for unique name on creation of null
  • ObjectFactory
    • Added reference checking and checks on certain functions
  • Modulefactory
    • Initial creation, reworking master class from Limb
    • self repairing initialization
    • added initialization for referenced assets
  • Limb
    • module – Initial creation utilzing the ModuleFactory master class
  • PuppetFactory
    • Reworked setAxis functions to prioritize setting, conflicts will be changed. Priority order is aim,up,out
    • Added add module feature
    • Added ModuleFactory and BufferFactory as callable for certain features
    • Made it work with referenced puppets
Wed, Jul 11th, 2012
posted by jjburton 09:07 AM

Short and simple vid this week on how to install the tools. Prolly should have done this a while back.

Work has been coming along with the rigger, gotta say my rudimentary code from last year is just lousy. That’s why we learn and grow, no?

If you’ve missed it, we’re lookin for feedback on where to proceed next. If you’d like to give us your input, please fill out the form here:

https://www.cgmonks.com/public-input-july-2012/

 

Mon, Jul 9th, 2012
posted by jjburton 02:07 PM
Most of the work stemmed from getting back to work on the modular rigger. Afraid it’s gonna be a long slog…:)
  • cgm.NameFactory
    • Made the simple do namer work better. Added a fastIterate option (default is True). Now if sceneUnique is false it doesn’t look in the scene for the name
    • fixed various bugs this introduced
  • Fixed a bunch of broken links stemming from attributes.deleteAttr changing to attributes.doDeleteAttr
  • cgm.controlBuilder
    • Fixed a problem from a function call change
  • cgm.PuppetFactory
    • Started the rigger, currently this is what it’s going to be called
    • Moved the size template maker to this class
    • Set up the class as self repairing for structure
  • cgm.Thingamarig
    • Started the tool, still VERY early. This week…
      • Puppet creation
      • Geo assignment
      • Axis picking
      • name changing
      • size template creation
  • cgm.AttrFactory
    • Added enum command on initialization call
    • Added initialValue keyword for a value ONLY set on creation
  • cgm.attributes
    • Doc fixes, and some bug fixes
    • + addPickAxisAttr(obj,name) – easy axis picker attribute
Tue, Jul 3rd, 2012
posted by jjburton 02:07 PM
Big progress for the week:
  • Updated the documentation for attrTools
  • Added buffer mode and controls to the snap marking menu
  • Lots of work on attributes front. Got a good handle on pretty much all types except multi attributes which we’ll swing back and hit later
  • Big addition this week was developing the attributes.doCopyAttr command. Maya’s own copyAttr command is a bit limited in a few ways:
    • Doesn’t support attribute copying on shape attributes
    • Doesn’t copy attribute settings (keyable, locked, etc)
    • Doesn’t allow remapping (i.e. attributes must match between objects)
  • By making our own, we’ve added some pretty cool functionality;
    • If an attribute to copy to doesn’t exist on the target, it’ll make one
    • Attribute mapping
    • copying attribute state flags
    • On the fly attribute conversion
Lessons Learned:
  • Maya’s copyAttr doesn’t support shapes annoyingly, so gotta make one. However, this has afforded more options
  • Deleting certain attributes can crash maya, yay!
  • Adding a softMin/Max to an attribute, makes it a slider in the attribute editor
  • a = b not good for copying, a = copy.copy(b) copies without the connection (make sure to import copy first:)
Next Up
  • Ryan’s estimating the first bit of the new web push will be ready next week
  • Getting back to the rigger, trying to get the base plan going on it.

 

Mon, Jul 2nd, 2012
posted by jjburton 09:07 AM

cgmToolbox_07032012

  • cgm.locinator
    • Made update reselect initial selection on a buffer mode update
  • cgm.snapMM
    • Added buffer tools
    • Added attrTool launcher
  • cgm.animTools
    • Added buffer tools to it
    • Made update reselect initial selection on a buffer mode update
  • cgm.attrTools
    • Made it try to load selection on call
    • Added softMin/Max options
    • Added right click menu on connection report to select them
  • cgm.AttrFactory
    • doCopyTo – used to copy values and connections between attributes
    • doDuplicateTo – used to duplicate an attribute from one object to another
    • doTransferTo – used for actually moving an attribute from one object to another
    • added soft mins and maxes and parent/children/siblings storage
    • Added soft max,min storage
    • Added storing of family info – parent,children, siblings
    • Added some better settings copying over
    • Added children command pass through commands to (doKeyable,doLocked,doHidden,set)
  • cgm.attributes
    • Had to do a bit of migration after discovering that copyAttr doesn’t work on objects without transforms
    • doBreakConnection
      • Modified to deither take (obj,attr) or (obj.attr) format
      • Updated to be able to correctly find parent connections (ie. translateX connected via translate)
    • returnObjAttrSplit – simple attr splitter since it’s a pretty common task
    • returnDriven/DriverAttribute commands to correctly find parent connections
    • returnAttrFamilyDict(obj,attr) = returns parent, children, sibling attributes in a dict format or false
    • doAddAttr(obj,attrName,attrType,*a, **kw) – generalized attr creation call
    • validateRequestedAttrType(attrType) – verifies an attr type call against an attrType Dict
    • returnStandardAttrFlags(obj,attr) – returns a dict of ‘keyable’,’locked’,’hidden’ states of an attribute
    •  returnMatchNameAttrsDict(obj,target,[attrs]) looks for name matches between attributes regardless of alias
    • returnNumericAttrSettingsDict
    • returnCompatibleAttrs(sourceObj,sourceAttr,target) –
    • validateAttrTypeMatch – simple match return to see if attribute type matches
    •  returnObjectsAttributeByTypeDict(obj,types=[]) – returns dict of attributes by type key
    •  doCopyAttr –
      • toObject(string) – obj to copy to
      • toAttr(string) — name of the attr to copy to . Default is None which will create an  attribute of the fromAttr name on the toObject if it doesn’t exist
      • values(bool) — copy values. default True
      • incomingConnections(bool) — default False
      • outGoingConnections(bool) — default False
      • keepSourceConnections(bool)– keeps connections on source. default True
      • copyAttrSettings(bool) — copy the attribute state of the fromAttr (keyable,lock,hidden). default True
      • connectSourceToTarget(bool) useful for moving attribute controls to another object. default False
 
Creative Commons License

Categories