Save Vector Array in Basecontainer
-
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]
-
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() -
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). -
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.
-
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!