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

    RDATA_NAME ?

    SDK Help
    0
    6
    485
    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 22/08/2004 at 13:55, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.500 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi there,
      could anybody about the "RDATA_NAME" container id inside the RenderData class. It seems not to work in 8.5 COFFEE. Can I get the the name of those render settings witch can be reachable inside the actual document class? 
      thank you
      fuxy

      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 23/08/2004 at 09:29, xxxxxxxx wrote:

        In 8.5 the RenderData objects are true BaseList2D's, so in C++ you can get the name with GetName(). However, the C.O.F.F.E.E. model doesn't reflect this -- there's no such member -- so it's doesn't seem possible to get the name.

        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 23/08/2004 at 10:02, xxxxxxxx wrote:

          Thank you Mikael.
          Im not too happy. 😞
          Let's go to C++.

          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 30/08/2004 at 23:19, xxxxxxxx wrote:

            Hi Mikael,
            I tried to rewrite COFFEE code in VC++, but it happened what I was affraid.
            I have no experiences in C++ an I'm a poor architect some delphi practise so I will haven't too much practise in the future (i think 🙂 ).
            I don't know the right way to create new RenderData object and copy into a BaseContainer data from existing RenderData.
            I would like to duplicate the selected render settings. 
            You can see the different codes. the coffee codes works properly except the GetName() function, the C++ codes works properly except the duplicate BaseContainer data :)))
            the COFFEE code:

                
                
                 
                
                
                
                
                var bc3;  
                 var ind;  
                 var i;  
                 var count;  
                 var render;
                
                
                
                
                 var newbc = new(BaseContainer);  
                 var newrender = new(RenderData);
                
                
                
                
                 doc = GetActiveDocument();  
                 render = doc->GetFirstRenderData();
                
                
                
                
                 render->GetContainer()->CopyTo(newbc);
                
                
                
                
                 newbc->SetData(RDATA_NAME,"FX created");  
                 newrender->SetContainer(newbc);
                
                
                
                
                 doc->InsertRenderData(newrender, NULL);
                
                
                
            

            The C++ code

                
                
                
                
                 BaseContainer bc;  
                 BaseContainer newbc;  
                 RenderData    *rdata;  
                 RenderData    *newrdata;  
                 BaseDocument  *doc;
                
                
                
                
                 doc = GetActiveDocument();  
                 rdata = doc->GetFirstRenderData();
                
                
                
                
                 name = "Copy of_" + rdata->GetName();  
                 bc = rdata->GetData();  
                   
                 newrdata = rdata->Alloc();  
                 newbc = BaseContainer();  
                   
                 newbc = bc();  
                 newrdata->SetName(name);  
                 newrdata->SetData(newbc,TRUE); 
                
                
                
                
                 doc->InsertRenderData(newrdata,NULL);
                
                
                
            

            thank you.
            bye
            Fuxy

            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 02/09/2004 at 01:57, xxxxxxxx wrote:

              This is one way to do it:

                  
                  
                  if (doc)  
                  {  
                    RenderData* rd = doc->GetFirstRenderData();  
                    if (rd)  
                    {  
                      RenderData* newrd = static_cast<RenderData*>(rd->GetClone(0, NULL));  
                      if (newrd)  
                      {  
                        newrd->SetName("Copy of " + rd->GetName());  
                        doc->InsertRenderData(newrd, rd);  
                        EventAdd();  
                      }  
                    }  
                  }
              
              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 02/09/2004 at 02:16, xxxxxxxx wrote:

                Thanks a lot Mikael. It works now.

                bye
                fuxy

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