Updating Old Templates

Sometimes you have an older template that needs to be brought up to date. What’s the best way to do that? Let’s work through it and see. For this test case I’m updating mDrake after a couple months of major work and need to get the template ready for the Workshop update.

Here’s the pre updated template.

Before we begin

Typically we want to be as non-destructive as possible so.

  1. See if we need to actually update anything
  2. Save the template to a new file
  3. Save off important bits there typically get messed up

Check status

  • In mrsBuilder, change to root mode
  • Select a block
  • Contextual>Utilities>Block Current?

You’ll see something like this in your script editor of stuff is out of date.

----------------------------------------------------------------------------------------------------
[mDrake_masterBlock] up to date | blockVersion: alpha.1.05312018
[pistol_limbBlock] out of date | blockVersion: alpha.1.09122018 | blockModule: alpha.1.03012019
----------------------------------------------------------------------------------------------------
# Error: cgm.core.mrs.lib.block_utils : |is_current| >> blockType not found in blockProfiles. Please fix | found spine ... # 
['spineUp', 'earUp', 'simple', 'tail', 'spineFwd', 'tentacle']
----------------------------------------------------------------------------------------------------
[CTR_spine_segmentBlock] out of date | blockVersion: alpha.1.08102018 | blockModule: alpha.1.03012019
[R_arm_limbBlock] out of date | blockVersion: alpha.1.04212018 | blockModule: alpha.1.03012019
[R_pinky_limbBlock] out of date | blockVersion: alpha.1.06012018 | blockModule: alpha.1.03012019
[R_thumb_limbBlock] out of date | blockVersion: alpha.1.06012018 | blockModule: alpha.1.03012019
[R_ring_limbBlock] out of date | blockVersion: alpha.1.06012018 | blockModule: alpha.1.03012019
[R_index_limbBlock] out of date | blockVersion: alpha.1.06012018 | blockModule: alpha.1.03012019
[R_middle_limbBlock] out of date | blockVersion: alpha.1.06012018 | blockModule: alpha.1.03012019
[L_holster_limbBlock] out of date | blockVersion: alpha.1.09122018 | blockModule: alpha.1.03012019
[R_leg_limbBlock] out of date | blockVersion: alpha.1.04212018 | blockModule: alpha.1.03012019
----------------------------------------------------------------------------------------------------
# Error: cgm.core.mrs.lib.block_utils : |is_current| >> blockType not found in blockProfiles. Please fix | found headNeck ... # 
['box', 'simple', 'neck long', 'neck short']
----------------------------------------------------------------------------------------------------
[head_headBlock] out of date | blockVersion: alpha.04022018 | blockModule: alpha.1.03012019

So, yeah, need to update…

Note, it’s telling us that blockProfiles on two blocks need to be changed before they can be updated.

If you’re all up to date, this post is not for you.

Save off Important bits

As I was working through this there are few things that just don’t update well.

  • Custom geo that’s been added
  • CV work (until we implement this)

Custom Geo

We have some custom geo we don’t wanna lose and be able to add back quickly.

  • Select the head geo
    • If it’s not selectable, toggle the lock via the right click menu
  • Remove it from the block via the same menu

CV stuff

Currently, cv edits don’t get saved so we need a way to do that. In our case, it’s just the feet I wanna grab. What’s a good way to do that?

So for the foot:

  • I’m just going to select the foot bank control
  • Duplicate it
  • Parent it to world


Other curves you can use the same setup for.

Thoughts

  • To keep things clean, parent those bits we want to reincorporate under a null
  • I only do one side as I’m going to remirror my block rather than do this for both sides UNLESS I have side specific stuff I need to bring across

Update our blocks

Now we’re ready to do the the updating.

These aren’t the blocks you’re looking for…

  • First I’m going to pull the facial blocks out because I don’t wanna update them.
    • Select those blocks
    • Contextual > Parent > Clear | Clear parents
  • I don’t care about the left side blocks as I’m gonna mirror them so I’ll just delete them
    • Select
    • Contexual Row > General > Delete

Cross you fingers

Time to do the thing!

  • Select a block in the heirachy
  • Change Context to root
  • Contextual > Utilities > Update Block
  • Let it run
  • While we wait…

What’s happening?

The block update call does the following

  • If the block is current, returns True
  • First checks if the blockProfile assigned is actually still valid. If not, it bails until you resolve
    • Select that block
    • unlock the blockProfile attribute
    • Type in a valid blockProfile
  • Verifies the block attrs
  • Re pushes baseDat to the block from the blockProfile
  • Saves the blockDat
  • If there’s a stopState arg, set the blockDat to that
  • Loads the blockDat which also pushes states to where we want
  • Sets the version of the block to current

Follow up

Let’s see where we stand. We have the updater currently stop at define so we can check things. However the later data is stored to load as we go as we’ll see.

Do a quick inventory.

  • The neck top is off in la-la-land. I added a new neck setup so this was expected
  • The rp handles and some up handles are off. Again expected as I changed how these worked in our define state.

Let’s go through and fix things.

Pistol

It actually looks fine. I’m going to push it through the states and see how it looks.

I’m doing this manually by step to check things as we go. Normally I’d just load the blockDat which would automatically push states.

Leg

  • Rotated both rp/up handles down facing forward
  • Then pushed to template
  • Load the template
  • I’m going to use the Match WS function to match my foot pivot to my old cv shaped one.
  • Now the leg has the new loftList setup and more

Spine

  • The up handle was pointing funky, so I fixed it
  • Push through and load states
  • Bingo

Arm

  • RP plane needs to rotate out
  • Push through and load states

Head

  • Zero out the end handle to move back to base
  • Rotate up handle
  • Fix rp
  • Use the saved off head stuff to resize my base
  • Push to template
  • Load State
  • It loaded as rubbish so I undid that and
    • Changed my subshaper count down
    • Retemplated
  • Add my head geo I saved off
  • Prerig
  • Load State

Fingers

  • The up handle was pointing funky, so I fixed it
  • Push through and load states

Mirror blocks

Mirror all our blocks to the other side.

  • Sometimes you need to mirror pull after the verify. Will look into that

Test Build

Do a test build to make sure everything update and is building. Here’s our template.

Few bugs…then built!

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.