THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/12/2012 at 16:01, xxxxxxxx wrote:
info : R14, Vista64, Python
hi,
i have got a stupid question again. i have got a command plugin generating data for a
c4d file stored in a multilevel BaseContainer. currently i am saving these data with a
hyperfile which is a bad solution, because renaming or moving the c4d file breaks the
connection between the data and the c4d file. so i am looking for a better place now.
i want :
- to store the data within the file
- the data not to be visible to the user (as a object, material or tag node)
possible ways i have been looking into :
- use BaseDocument.SetData()
1. is this way even possible ?
2. i have tried the following simple example:
*
* console output:
* SystemError: source\pymodules\c4d\PyBaseContainer\PyBaseContainer.cpp:1095: bad argument to internal function
*
* * import c4d
*
* def main() :
* bc = c4d.BaseContainer()
* bc.SetBool(c4d.DOCUMENT_RENDERLOD, True)
* doc.SetData(c4d.DOCUMENT_RENDERLOD, bc)
*
* if __name__=='__main__':
* main()
*
3. so, how is the correct way to feed this method ?
4. can i use own type ids and which id would i have to use without conflicting with other ids ? my plugin id ?
- use a NodeData plugin
1. is it possible to create some NodeData subtype plugin type and add it in *hidden* mode into the document ?
2. the sdk says it is even possible to inherit from c4d.plugins.nodeData itself, but when i do so, my plugin hasn't any access to the methods provided by NodeData.
sorry for this bunch of questions, but i have really tried to solve this on my own without any real
success. i would be really thankful for a push into the right direction. i have also tried the search
function on this without any useable result.
thanks for reading and any help.