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.
Aargh! We desperately need buttons!
Yeah, bummer I know 😉 The first I tried to do was add groups and buttons.
Hi! Not for ICE but for shader compounds buttons do seem to work:
Yep, handy isn’t it. Which is why it’s all the more frustrating that we don’t have this for ICE compounds!
Merry Christmas everyone 🙂
ICE PPG layouts have more stuff happening under the covers, so it wasn’t as easy to add in support for PPGLayout changes.
Sure, I figured there must be some issue that we’re not party to.