Archive for the 'Announcements' Category

Sat, Oct 13th, 2012
posted by jjburton 01:10 PM

So saw some questions on these enigmas around and wanted to attempt to shed some light on them.

optionVars are maya devices for saving information between maya sessions, from say one tool session to another or any other wide variety of things. By default you use them like something like this:

If you decided you wanted to play with optionVars. They’re awesome but can be a bugger to get working the way you want them. We use them to save settings between gui sessions and even to send info to some stand alone functions.
[crayon]
import maya.cmds as mc
case = ‘int’
if not mc.optionVar(exists =’optionVarTest’):#if it doesn’t exist, make it
if case == ‘int’:
mc.optionVar(iv=(self.name,0))#creates an int one
elif case == ‘float’:
mc.optionVar(fv=(self.name,0))#creates a float one
elif case == ‘string’:
mc.optionVar(sv=(self.name,”))#creates a string one

mc.optionVar(q=’optionVarTest’)#To get a value
[/crayon]

If you want to add to a string one you have to remember it’s a string one and use a different flag than a int or float one. It got confusing to us, so we decided to go a different route.

We wrote a class wrapper for dealing with them that made it easier for us to get a handle on so that we call them at the top of any gui with something like:
[crayon]
from cgm.lib.classes.OptionVarFactory import *

self.OptionVarInstance = OptionVarFactory(‘cgmVar_Name’, defaultValue = 0)
[/crayon]

That initializes the option var to an instance that can be appended, rebuilt, culled purged, cleared, call, converted or whatever in any of our tools.

The defaultValue flag sets the value only if the optionVar doesn’t exist. We did that so that if a specific tool is reset and has it’s flags wiped. It builds again with the default ‘factory’ settings. It also converts on the fly so if you pass a string to a non string optionVar, it converts it to a string, and so on.

Settings are called and set via commands like:
[crayon]
v = 1
self.OptionVarInstance.name # pretty straight forward
self.OptionVarInstance.form # type of option var it is
self.OptionVarInstance.value # to call value
self.OptionVarInstance.set(v) # to set
self.OptionVarInstance.toggle() # only works on ints for bool type functionality
self.OptionVarInstance.append(v) # makes list and/or appends
self.OptionVarInstance.remove(v) # removes an item
self.OptionVarInstance.clear() # clears it
self.OptionVarInstance.purge() # deletes it
[/crayon]

We also flag all of our optionVar’s with a ‘cgmVar’ so that we can easily do a full wipe of our variables when needed for testing.

You’re welcome to give it a try if you like or take part of it it works for you and run with it or join us and help make it better. It’s in the cgmTool box from cgMonks – cgm/lib/classes/OptionVarFactory

Have a great weekend!

Mon, Oct 8th, 2012
posted by jjburton 04:10 PM

This week, the big thing we’re workin on is this…check it out:)

http://www.kickstarter.com/projects/cgmonks/morpheus-rig-v20 

Thu, Oct 4th, 2012
posted by jjburton 02:10 PM

The past few weeks…

It’s been a hectic few weeks at CG Monks. David and I have been working hard finishing a crazy deadline commercial gig. ~2 minutes of content in about 2 and half weeks. Yeah, nutty. I had a lot of fun on my own segment though, of course, wish I’d had more time  to polish. When you have a week and a half to animate 30 seconds with a continual movement shot comprising  4 main characters, a couple of birds, sets popping in and out of place, a crowd of ~100 and all on a spinning ‘world’ some corners have to get cut:)

The team did a great job and for what we had to work with in the time we had, it’s a nice bit of work. Bokser acted as the project lead on our end, we shared TD hats and I acted as animation lead.

Morpheus 2.0…

The ball is rolling. We have our project in for Kickstarter for review and expect it to be ready for Monday. If not, we may have to delay a day or two but it’s out of our hands. Our pal, Martin is doing our edit for the Kickstarter vid and he did a great job – especially with a talking Josh who talks like he’s  had an double shot espresso…Venti.

Support Platform…

Ryan has been working away on getting our community platform up and running and we’re looking to start opening up for testing soon. If you’re interest, connect with us on our testers page. As it’s the vehicle we want to use for both our own tool and rig support and potential place for others, we wanna get the kinks out before we get too much traffic.

Bugs…

Production is a great finder of bugs and oh did I find some bugs in the cgmTools. This week I’m trying to get a handle on them to avoid repeating some of these issues in the future and preparing for starting Morpheus 2.0 development.

Fri, Sep 21st, 2012
posted by jjburton 01:09 PM

We have a rather big ball to get rolling. Hope you’ll join us!

Mon, Aug 20th, 2012
posted by jjburton 09:08 AM

Josh has been playing around with a tag animation for the company – both need a break from Python and wanting to animate a bit. Bokser has volunteered to do the particle fx. Seriously. He did. Don’t believe his denials…:)

Wed, Aug 15th, 2012
posted by jjburton 11:08 AM

Playing around with some new concepts. So many potential applications. Looking forward to hearing ideas from the community.

 

Wed, Aug 15th, 2012
posted by jjburton 10:08 AM

Been a bit. Trip to LA, Keith making Squirrely move through space and all, Siggraph, sleep…

cgmToolbox_08152012

Lessons Learned

  1. Store import objects to message attributes during a script to make sure you always have it’s name
  2. If you think a nested list is sounded good, see if a dictionary will work better
  3. Looking at code a year after writing it is painful….so very painful…
  4. Document your code!
  5. I appear to be close the edge of my current abilities in this current endevour and am more than ready to get back to rigging characters. This modular rigger may well break me:)
  6. Push auxilary keywords out of the def declaration for classes that will push keywords through
    http://stackoverflow.com/questions/1941812/django-error-got-multiple-values-for-keyword-argument
  7. Don’t use “”” in the body of code for commenting, it makes it harder to comment out sections
  8. Took another stab at the bridge concept to no avail:
    It doesn’t look like a singleton is what I’m looking for but the ability to intialize a super class from side a class and then see that instance from other instances. 
    1. http://c2.com/cgi/wiki?PythonSingleton
    2. http://stackoverflow.com/questions/423379/using-global-variables-in-a-function-other-than-the-one-that-created-them

 

Build Notes

  • AttrFactory
    • Added lock flag ability on  call
    • Can now pass list values directly into compound attributes (vectors)
  • ObjectFactory
    • getNameTagsFromObject – copies cgm name tags from a target object
    • setDrawingOverrideSettings – added to easily set drawing overrides
  • Limb.module & ModuleFactory
    • getPartBaseDistance – gets base distance for a module with a start point and a mesh group
    • getGeneratedInitialPositionData – get’s split info for starting positions for controls to be built from
  • cgm.attributes
    • doGetAttr – fixed a bug I introduced with double attributes
    • doDeleteAttr – added a check for children attributes
    • doCopyAttr – added connectTargetToSource option
    • returnUserAttrsToDict – fixed a logic break down
  • cgm.dictionary
    • Added validateDirection – returns a validated direction from a dictionary of check terms
    • Added validateDirectionVector – to get back a valid vector from either string or vector call. False if not valid
  • cgm.distance
    • returnClosestPoint(startPos,posList) – pretty self explanatory
  • cgm.modules
    • doPurgeNull – fixed
  • cgm.position
    • moveAimObjects – aim a list of objects one to another with settings
    • Added some assertion checks
    • Modified most of the functions to allow string calls for vectors
  • cgm.rigging
    • zeroTransformMeObject – Fixed a bug introduced from some NameFactory work a few weeks back
  • cgm.constraints
    • Added – returnNormalizedWeightsByDistance = better distance weight tool whereby giving greater weight to closer objects
  • ModuleFactory
    • Added axis
    • Added returnOverrideColors
    • Added getState – simple state check for module
    • getCoreNames – generate core names for a module
  • DraggerContextFactory (NEW)
    • screenToWorld(startX,startY) – converts a screen space dragger context click to world space
    • findMeshIntersection(mesh,raySource,rayDir) – Return the closest point on a surface from a raySource and rayDir
    • class ContextualPick – class version of draggerContext to do magic with
    • class clickIntersections – class function to get intersected points on a mesh from a point in space and a vector
    • class clickSurface – class function to get surface points on a mesh from a draggerContext thingy
  • PuppetFactory
    • Added temp bridge to facilitate faster loads
    • Worked on aiming logic for templates
    • getState – checks the state of a puppet which happens to be the min state of it’s modules
    • doSize – working on batch template stuff for rigger
    • getOrderedModules
    • getOrderedParentModules – get’s an ordered list of parent modules by heirarchy and stores a dictionary of module children indexed to module name as well as stores rootModules to self
  • cgm.PuppetBox
    • Added temp bridge to facilitate faster loads
    • Setup initial if checks for state for buttons, help and report stuff
    • Added puppet state checking for the report at the top
    • Added axis setting per module via pop up menu
    • Added copy axis from parent module
      • currently just working with master module
Wed, Aug 15th, 2012
posted by jjburton 09:08 AM

First off, thank you for all the great uses so many of you have put Morpheus (and Squirrely) to. You’ve pushed the rig in ways I hadn’t anticipated and it’s so exciting to see it.

This September, CG Monks will be starting a Morpheus 2.0 Kickstarter campaign to help fund the project. We have a lot of ideas and would love to get moving on the project but we want to try and find a way to fund development of rigs like Morpheus and Squirrely, tools, assets and other projects for the community we so loving being a part of. We reached out to many of our communities and a Kickstarter campaign was one of the common themes we kept hearing. So, we’re gonna give it a shot.

What we’re looking for now is quality versions of some of the great animations we’ve seen on the internet. So, if you’ve created a great animation with Morpheus and want to possibly be included on a best of video to be featured as a part of our campaign, please upload a good (hd is preferred) version of it to Vimeo and send me a link to the video – (no spaces) j j b u r t o n @ c g m o n k s . c o m. In your message, please list your name and an email or webpage if and as you want them specified.

I’ll post again when we have a better idea of when the kickoff date will actually be.

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