cgmToolbox – build 07232012


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
Be Sociable, Share!

Comments are closed.