Instead of being an idiot and reinitializing the same object for multiple classes, just link it

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.

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

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

On second thought, not sure this is a grand idea

Need to ensure to pass through verify functions to children modules

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

BaseMelUI bug – Seems to be an issue with getMenuItems and getSelectedIdx for MelOptionMenu

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

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.