Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Expression tag evaluation

    SDK Help
    0
    2
    383
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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).

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post