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

    How to access display tag data?

    SDK Help
    0
    4
    558
    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 27/02/2003 at 03:28, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi,
      isn't it possible to change data of a display tag?

          
          
          
          
               tag = BaseTag::Alloc(Tdisplay);  
               if (tag)  
               {  
                op->InsertTag(tag, NULL);  
                cData = tag->GetDataInstance();  
                cData->SetBool(DISPLAYTAG_AFFECT_DISPLAYMODE, TRUE);  
                cData->SetLong(DISPLAYTAG_DISPLAYMODE, DISPLAYTAG_DISPLAYMODE_WIREFRAME);  
               }  
          
      

      This code will insert the tag, but container data is not affected!?
      To verify the ID values, I tried this:

          
          
          
          
            BaseTag *tag = op->GetTag(Tdisplay);  
            if (tag)  
            {  
             BaseContainer *cData = tag->GetDataInstance();  
             LONG i;  
             GePrint("Searching ID...");  
             for (i=1000; i<100000; i++)  
             {  
              if (cData->GetLong(i) == DISPLAYTAG_DISPLAYMODE_WIREFRAME)  
               GePrint("ID:" + LongToString(i));  
             }  
            }  
          
      

      Nothing. I can change any value using the gui of the tag without any effect in the container data. 
      What's wrong?
      Analogous to Tphong and SetPhong(...), I looked for a method like "SetDisplay(...)"; without any success.
      Klaus Heyne

      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 27/02/2003 at 06:03, xxxxxxxx wrote:

        please search this forum with a corresponding value. There was already a thread that solved this problem.

        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 28/02/2003 at 10:12, xxxxxxxx wrote:

          Thanks for the hint. But the thread you mean, handles with coffee and didn't solve the problem.
          So, again a code snippet from the execute function of a plugin tag, assigned to the object, that also has the display tag:

              
              
              
              
                BaseTag *dTag = op->GetTag(Tdisplay);  
                if (dTag)  
                {  
                 BaseContainer *dData = dTag->GetDataInstance();  
                 dData->SetBool(DISPLAYTAG_AFFECT_DISPLAYMODE, TRUE);  
                 dData->SetLong(DISPLAYTAG_DISPLAYMODE, DISPLAYTAG_DISPLAYMODE_WIREFRAME);  
                 dTag->Message(MSG_UPDATE);  
                }  
              
          

          The debugger does not show the name of the display tag!? Should it?
          Is there something wrong with GetDataInstance?
          Klaus Heyne

          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 28/02/2003 at 10:21, xxxxxxxx wrote:

            Hi,
            sorry. My fault. Should have looked bette. HAven´t noticed you are working with C++.
            Yes, GetDataInstance is sometimes not possible (don´t ask my why. There must be a reason but I don´t know it). Use GetData to get the BaseContainer and use SetData after changing properties. This will work for the Display Tag (had the same problem some time ago).
            Best
            Samir

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