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
    • Recent
    • Tags
    • Users
    • Login

    Creating subcontainers

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 411 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 02/01/2009 at 12:05, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.x 
      Platform:      Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      I want to create a subcontainer inside an object container.
      It will have a unique ID (1000001 for now, for testing purposes) so that I can place inside it data with IDs of my choice (100,101,102,etc, for example).
      So, I tried using this code:

      > container=op->GetContainer(); \> ct2=container->GetContainer(1000001); \> if(!ct2) \>      { \>      ct2=new(BaseContainer); \>      ct2->SetId(1000001); \>      ct2->SetData(100,0); \>      ct2->SetData(101,0); \>      ct2->SetData(102,0); \>      }

      But... how do I store the new container with ID=1000001 inside the object container?!?

      > container->SetContainer(ct2);

      doesn't seem to work 😞

      Rui Batista

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 03/01/2009 at 04:28, xxxxxxxx wrote:

        Use SetData().

        cheers,
        Matthias

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 03/01/2009 at 04:31, xxxxxxxx wrote:

          But I'm using SetData, as you can see. How can I use SetData to create a subcontainer? Rui Batista

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 03/01/2009 at 04:49, xxxxxxxx wrote:

            This should work.

            > \> container->SetData(ct2); \>

            cheers,
            Matthias

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 04/01/2009 at 04:08, xxxxxxxx wrote:

              Yes, it works!! Thank you very much, Matthias 🙂 Rui Batista

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