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

    Save Vector Array in Basecontainer

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 430 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 17/05/2006 at 10:02, xxxxxxxx wrote:

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

      ---------
      Please, someone can show me the code to save an array of vector in my tagplugin base container.
      I need to save this data with the project file.
      Thank's

      [sorry for my Tarzan-english]

      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 17/05/2006 at 14:30, xxxxxxxx wrote:

        How is your Vector array stored in the BaseContainer? BaseContainer data is usually saved with the document/project file automatically. If it is not stored in the BaseContainer but in the class as a member or not saving from the BaseContainer for some reason, you'll need to implement all of these (regardless) foryour tagplugin:

        NodeData::Read()
        NodeData::Write()
        NodeData::CopyTo()

        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 18/05/2006 at 00:10, xxxxxxxx wrote:

          Thank's kuroyume0161, the vector isn't in a class, and can be stored directly to basecontainer.
          I want to understand, if it is possible, how to store a long array of vectors(up 1000 vectors) in the TAG basecontainer without use an ID for every vector (this becouse the array length is variable).

          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 18/05/2006 at 03:09, xxxxxxxx wrote:

            I wouldn't really be wise to store such large amounts of data in a BaseContainer directly like that, that could be very slow. If you really want to do that then you can use InsData just to add data to the BaseContainer, you can just set the ID to anything (same value even). A BaseContainer is just a list, so you can do what you like to it but keep in mind that means it uses memory and is slow. For every item in the BaseContainer, when you want to get/set an ID it must look through the list until it finds the ID! the more you have the longer it can take. If you use InsData you'll then need to get the data back directly, see BrowseContainer.

            Best would be to save the data yourself with the Read,Write and CopyTo, or if you really want to stay within a BaseContainer you could use GeData and add a custom data type, but thats much more work than simply using Read, Write and CopyTo.

            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 18/05/2006 at 06:07, xxxxxxxx wrote:

              Thank's David, now seems more clear! I don't have speed problems because I have to read data only at the beginning!
              I'll test Insdata way!

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