PPG logic for ICE compounds


New in the 2012 Advantage Pack: PPG logic for ICE compounds.

In the compound properties, there’s a PPG Logic button that opens up a script editor where you can define some PPG callbacks:

  • OnInit is called when a user opens the PPG.
    You can use this callback for initialization code, but you cannot define the PPG layout (eg add tabs, groups, or buttons). ICE has its own layout code and ignores any PPGLayout you might define.
  • _OnChanged is called when a user changes a value in the PPG.
from siutils import log		# LogMessage

def OnInit( ):
	log("Modulate_by_Fcurve_OnInit called")
	oPPG = PPG
	oLayout = oPPG.PPGLayout
#
# Clamp exposed port
#
def Clamp_OnChanged():
	log( PPG.Clamp.Value )
#
# Input Range Start exposed port
#
def Input_Range_Start_OnChanged():
	log( "Input Range = ( %.2f, %.2f )" % (PPG.Input_Range_Start.Value, PPG.Input_Range_End.Value ) )

#
# Input Range End exposed port
#
def Input_Range_End_OnChanged():
	log( "Input Range = ( %.2f, %.2f )" % (PPG.Input_Range_Start.Value, PPG.Input_Range_End.Value ) )

The “PPG logic” is saved in the element of the .xiscompound file.

6 thoughts on “PPG logic for ICE compounds

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s