Changing the mini-dopesheet Show Keys settings


To change the type of keys shown in the mini-dopesheet in the timeline, you set the same preferences used by the full dopesheet:

// Marked Parameters
Preferences.SetPreferenceValue( "dopesheet.timeline_display_keys",2 );

//Current Character Set
Preferences.SetPreferenceValue( "dopesheet.timeline_display_keys", 11 );

So, to toggle between Show Keys > Marked Parameters and Show Keys > Current Character Set, you could do something like this:

var x = Preferences.GetPreferenceValue( "dopesheet.timeline_display_keys" );
x = ( x==2 ) ? 11 : 2;
Preferences.SetPreferenceValue( "dopesheet.timeline_display_keys", x );

Combining mental mill CgFX shaders with Softimage and ICE FX trees


This video demonstrates how to export a CgFX shader from mental mill to softimage and combine it with an Ice Effect tree.
It shows techniques to augment your exported CgFX code by hand editing the exported CgFX code and passing data that was generated by an ICE FX tree in softimage to the shader. This enables you to create a completely new type of effects.

Here’s the corresponding mentallmill.blogspot post.

Getting model.Mixer.CompoundContainer.mixer.normalize with the OM (or how I learned to love the SDK Explorer)


In this video, I show a few common techniques for finding your way through the Object Model (OM) hierarchy with the help of the SDK explorer.
In summary, here are some of the most common ways to navigate an object hierarchy:

  • Object Model methods/properties, like Model.Mixer or Mixer.Transitions.
  • Parameters and Properties collections
  • NestedObjects

Here’s the JScript from the video:

// I want to get this: "MocapMan.Mixer.CompoundContainer.mixer.normalize"

// One step at a time
var mdl = Dictionary.GetObject("MocapMan");

var oMixer = mdl.Mixer;
var oCompounds = oMixer.NestedObjects("Compounds");
var oAnimation = oCompounds.NestedObjects( "Animation" );
var oCompoundContainer = oAnimation.NestedObjects( "CompoundContainer" );
var oMixer = oCompoundContainer.NestedObjects( "Mixer" );
var n = oMixer.NestedObjects( "Normalize" );

LogMessage( n.Value );

// All on one line:
var n = mdl.Mixer.NestedObjects("Compounds").NestedObjects("Animation").NestedObjects("CompoundContainer").NestedObjects("Mixer").NestedObjects("Normalize");
LogMessage( n.Value );

// Or something a little less ... nested:
var n = Dictionary.GetObject( mdl.Mixer.FullName + ".CompoundContainer.mixer.normalize" );

Python snippets. Had to re-dispatch to get it to work.

import win32com.client

mdl = Application.Dictionary.GetObject("MocapMan")

n = mdl.Mixer.NestedObjects("Compounds").NestedObjects("Animation").NestedObjects("CompoundContainer").NestedObjects("Mixer").NestedObjects("Normalize")
n = win32com.client.Dispatch(n)

Application.LogMessage( Application.ClassName(n) )
Application.LogMessage( n.Value )


n = Application.Dictionary.GetObject( mdl.Mixer.FullName + ".CompoundContainer.mixer.normalize" );
n = win32com.client.Dispatch(n)
Application.LogMessage( n.Value )