Expression tag evaluation
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/02/2003 at 13:37, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.012
Platform:
Language(s) : C.O.F.F.E.E ;---------
it seems that the "Execute" part of an expression tag is only evaluated when the object which it's attached to has it's parameters changed/is manipulated.is there any way to have a small section of code that is constantly evaluated (i want to change a variable parameter within my expression tag when the currently active object in the document changes).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2003 at 02:02, xxxxxxxx wrote:
I can't reproduce the behaviour you describe. This test script seems to be executed also when I change parameters of another object or move the time slider, also when the active object changes:
const var MYTAG_ID = 1011203; var mytag_icon; class MyTag : ExpressionPluginTag { public: MyTag(); GetID(); GetIcon(); Edit(); GetName(); Execute(doc, op); GetHelpText(); MultipleAllowed(); DisplayAllowed(); UseMenu(); } MyTag::MyTag() { println("MyTag"); super(); } MyTag::GetID() { println("GetID"); return MYTAG_ID; } MyTag::Edit() { println("Edit"); return TRUE; } MyTag::GetName() { println("GetName"); return "My Tag"; } MyTag::Execute(doc, op) { println("Execute: ", time()); return TRUE; } MyTag::GetHelpText() { println("GetHelpText"); return "My Tag"; } MyTag::MultipleAllowed() { println("MultipleAllowed"); return TRUE; } MyTag::DisplayAllowed() { println("DisplayAllowed"); return TRUE; } MyTag::GetIcon() { println("GetIcon()"); return mytag_icon; } MyTag::UseMenu() { println("UseMenu"); return TRUE; } main() { mytag_icon = new(BaseBitmap, PLUGINTAG_ICON_SIZE, PLUGINTAG_ICON_SIZE); mytag_icon->SetPen(vector(0.2, 0.3, 0.7)); mytag_icon->DrawRect(0,0,PLUGINTAG_ICON_SIZE,PLUGINTAG_ICON_SIZE); println("main"); Register(MyTag); }
Unfortunately it's not possible to set the camera dependent flag, since it's in a custom datatype not accessible from C.O.F.F.E.E., so you won't get called when the camera is moved.