MRS Dev Branch Update – 04.16.2019

Current Sprint: Class Build

  • WORKSHOP
    • Finaling
  • mrsAnimate
    • Bugs/workflow
  • Workflow
    • Continuing to iterate

IMPORTANT

  • All templates need to be saved, pushed back to prerig state, rebuild that state and reload otherwise LIMB blocks will not build. New wiring implemented.
  • Be aware that some options changed for LIMB especially. Your numControls and other settings need to be looked at.
  • blockState attr changed from string to enum. See update code in the section below.
  • Previous cgmTool users. You’ll need to remove the following from your userSetup.mel file in your maya script folder: python( "cgm.core._reload()" );

mrsBuilder

Important Changes

MRS Branch Update –

If you’re currently using MRS you’ll wanna look at these until I get a chance to update the docs.

  • Tech
    • AttrMasking implemented | See section below for more info
  • BUILDER
    • Contextual > Prerig > Visualize | Up vector || new visualization for new up vector method
    • Dev mode | currently only affects attrMasking.
    • AttrMasking | accessed via contextual menu
    • datList verify ui | implemented for rollList work.
    • Duplication | Added ability for rigBlock hierarchy to fix itself after below/root duplication
    • Filtering | Added block filtering
    • Color Coding | The Ui now displays the state by color. See below.
    • NameMatch | When you have two blocks that have the same scroll list entry, they will now iterate a name match suffix to let you know
  • General
    • BlockState changed from string to enum to make it viable in channel box.
      • SEE SECTION BELOW for code to update old templates
    • AttachPoint | implemented index setup to be able to attach to whatever joint you want in a parent block
    • Better reload | Reworked our reload to speed up our initial load and better use that process to loading cgm modules to local python (see section below)
    • Up Vector | Re retooled how the up vector of a given block module is calculated. The Orient Helper now is mainly to affect form up and the rp handle defines the up vector based on some math shenanigans of it’s vector against the orientHelper.
    • Proxy Mesh Creation
      • Factored out rigFactory necessity for some speed increase
    • Pivot Helper
      • Modified the specific pivot helpers to have track targets to follow the main rather than be parented to avoid scale shearing
  • HEAD
    • No IK Neck | now supports this build option
  • LIMB
    • MAJOR
      • Prerig process now further detached from Form. numShapers added and numControls now only affects prerig. Careful on old templates.
    •  Shapes
      • Updated ball/toe
    • Reworked numRoll/rollList setup
      • Define state – numRoll may be set
      • Form state – numRoll is pushed to the rollList per section
      • Skeleton State – rollList
    • Builds without IK now
    • Added right click ui menu for editing rollCount
  • RIGSHAPES
    • Segment handles | added some logic to these to be able to cast in all directions. Removes casts that are way outliers.
  • CORE
    • CORERIG
      • shapeParent_in_place | rewrite using blendshapes. Faster
      • match_orientation | BUG for new shapeParent_in_place use
    • CURVES
      • connect | new curve to curve connector for better shapes
      • create_fromName | added base size at creation from which then to scale up
    • DIST
      • scale_to_axisSize | added skip kw to skip specific channels
    •  ATTR
      • Add | little clean up work; when an attribute exists, it checks type. Added convert option.

LIMB Rework

Limb settings were confusing so took a pass on simplifying things.

Separating Form from Prerig

Previously control handle to form handle was one to one. So if you wanted to add another joint in a finger for example you had to go back to form, change the count, reshape and then go back to prerig.

Reworking End settings

Previously it was confusing how we had the end setup. We had a hasEndJoint attribute that wasn’t clear. Since we redid the form separation, we had more freedom in how we handled this. So we added buildEnd as an enum to be consistent with our buildLever, buildBall,buildToe,buildLeverEnd options.

Generally, your number of prerig handles is:

  • numControls
  • buildEnd – This adds a handle
  • buildLeverEnd – This adds a handle

To remember:

  • buildLeverEnd forces on buildEnd for the main chain

Profile Update

Updated profiles to work with the new setup.

Workshop

Assets

  • Updated mDrake, Horse and Morphy Kid to new block updates

Attr Masking

Since this is implemented, most users will never know it’s happening. Which I suppose is the idea with things that are supposed to improve the user experience.

A common issue as we’ve been working through things is helping the users know what to be messing with at various states.

As you can see on the image on the right. It was getting a bit long in the tooth as the young ones are want to say these days.

Our current idea for cleaning this up is to add masking of the attributes by state so you don’t see stuff you don’t need to. Some attributes are decidedly for specific states.

Implementation

  • Added some attribute state buffering to block creation so that at block creation the visibility and keyable state of user defined attributes are buffered via a json list to baseDat
  • Added framework to be able to specify at what state attributes turn on and off
    • Attributes with no other arg will turn on at define
    • BlockModules are checked for data to be able to have custom setups per block
      • _d_attrStateOn | Indexed dict for which attributes turn on at which state
      • _d_attrStateOff | …
      • d_attrProfileMask | Always off attributes for certain blockProfiles. For example for turning the ball or toe off for arms.
  • Added dev mode to ui. When off, the attrs are filtered. When dev mode is one it doesn’t happen. You can also manually set the attrMask via the contextual menu
  • Added ui button

 

Better Block update

The first pass on block update hasn’t held up well over the last few weeks. Too much still has to be fixed.

So looking at some of the work done lately I’m thinking how to best repurpose that.

  • Control dat – Really happy with the new gather from controls_mirror
  • The bakeScale work has setting down pretty well
  • This will be a good precursor for a full blockDat replacement

snapShot_get

Temp name till I replace block.

  • Added ability for the base controls_get to return dict data of the control sets: define,form etc
  • I then need to get that data to a transferable state because at recreation their mObj’s well be gone
    • index key
    • store short name
    • store cgmTag dict for match backup

Added some changes to other calls

  • controls_get | added asDict return method which sorts the return data by blockState

Ran down this trail a bit and it’s working somewhat. However, I think actually getting the blockDat to a better place makes much more sense. To that end.

blockDat_get

Ug…this thing.  As we discussed last time, scale is a bugger.

  • Bounding box scale is working for the most part
  • However, with the amount of tweaking I’m thinking that I still need to use the snapShot method and keep blockDat pure

So much rework…

  • Changed pivot helper to work better with this method
  • New override for block dat for overloading a mode (updating for example)
  • Added storage of name base names to match names after the fact if needed
  • Added axis box storage for loft curves
  • DIST.scale_to_axisSize | added skip kw to skip specific channels

Better Reload

Took the time for a little spring cleaning and make things work a little smarter.

Getting rid of core._reload() call at open

We’ve removed the offending modules that was reloading the core on maya opening. This will shave ~5 sec from opening maya.

IMPORTANT – You’ll need to remove the following from your userSetup.mel file in your maya script folder: python( "cgm.core._reload()" );

New way to load local python

Previously we’d manually handled each load local call via a maya mel.eval. As I was looking at things I decided to try something new.

  • Our reload call walks out structure to reload every module.
  • Added a new attribute to modules we want to reload __MAYALOCAL = 'THIS'
  • When the reload walks the modules, if it detects that key it will attempt to load that module locally to maya.
  • This won’t affect most of you but it will help our trouble shooting and anyone using our code.

What does load local mean?

In the script editor this is the same  as running:import cgm.core.cgm_Meta as cgmMeta

…without running it. It’s just there.

blockState to Enum

Responding to request to make blockState attr a locked enum rather than string so that users can more easily see.

Done but older template files will need to be updated with the following:

for mBlock in r9Meta.getMetaNodes(mTypes = 'cgmRigBlock',nTypes=['transform','network']):
    mBlock.atUtils('verify_blockAttrs',queryMode=False)

It’ll throw some errors like:

# Error: cgm.core.lib.attribute_utils : |convert_type| >> Failed to set back data buffer |R_middle_toe_limbBlock.blockState | data: prerig | err: setAttr: Error reading data element number 1: prerig

It’s fine.

If you can see your blocks in mrsBuilder. You’re good.

Bugs

Duplication not maintaining Hierarchy

Bokser was doing some work with some multi arm stuff and needed this working.

  • Added some code to builder to allow it to figure out what the proper blockParent should be after duplication

Better ball casting

Another user came across the foot ball shape casting weird. What the issue is is that the first cast of the ball isn’t hitting anything in range until it goes up through the leg almost to the hip.

I’ve got a couple of ideas on how to fix this.

  • The max distance is obviously way too big so the simplest solution would be to have a more reasonable max cast. I’m thinking I can use an initial out cast to get the max up cast.
  • If that fails to work I’ll make a separate cast surface for the foot section from the last loft curve and add the foot shapes for casting

Pass 1

First pass is better but not quite.

  • Turns out my max cast isn’t working right.
  • Not sure if that’s a maya bug or what and don’t have time to dig into it.
  • Added a check to the mesh slice cast to check the dist from hit to pos to not let bad values through anymore.

Pass 2

Went ahead and made a new mode for my casting mesh creator to make a foot only to cast. It works better.

This will work for now.

Skeleton Creation

Had a user came across an interesting bug where he was getting an extra transform during skeleton creation.

  • Having anything selected when joints are created creates them under that object.
  • Thus any joints created under a scaled dag get that scale as a transform when reparented
  • Couldn’t find a flag to create without that and making a new joint maker seemed overkill
  • Added a selection clear to that part of the process

 

Josh Burton

[MRS Project Lead | CG Monks] Josh is an animator turned TD who hails from Oklahoma, pre-undergrad in the Marine Corps, animation basics at Savannah College of Art and Design, cut his teeth in gaming and commercials before co-founding CG Monks and more recently the CG Monastery. The Morpheus Rigging System is a culmination of years of R&D and he is now thrilled to see what users can create, collaborate and expand on with this open source MRS platform.