I just posted this to the Shake list but since not everyone follows the list...
Ever wanted to be able to sense whether a script was rendering just to update the viewer or if it was writing to a flipbook or fileout?
Maybe you have a particularly ugly macro that you'd like to write a special "proxy" version of for the interface but have it render a more cpu-intensive version when writing out the final comp... I have a half dozen other uses for this thing and spent DAYS looking for it. Eventually, I made this dirty little hack.
gui.colorCtrl.curveEditorDirection+gui.trm
Evaluates to 1 in the viewer. 0 everywhere else. Works in standard shake or tremor interface.
POC (displays "viewer" to the viewer, otherwise displays "render):
Text1 = Text(720, 486, 1, "{result}", "Utopia Regular", 100,
xFontScale/GetDefaultAspect(), 1, width/2, height/2, 0, 2,
2, 1, 1, 1, 1, 0, 0, 0, 45, 0, 1, string option1 = "Viewer",
string option2 = "Render", string result = (gui.colorCtrl.curveEditorDirection+gui.trm)==1?option1:option2);
Cheers!
Ed Offermann