p.vaz Posted August 26, 2016 Share Posted August 26, 2016 Hi, In a unigine script, I would like to save a Node (recursively) in a .node file. I've searched in the documentation in the functions of engine.world but it seems that the function saveNode() exists only for C++ and C#. https://developer.unigine.com/en/docs/2.3/api/library/engine/class.world?rlang=usc I've tested anyway the function engine.world.saveNode(file, n) in my unigine script and I was happy (and also surprised) that it works. I need to know : is it an omission in the documentation ? or is it a function that will disapppear later ? Regards Link to comment
silent Posted August 26, 2016 Share Posted August 26, 2016 Hi Philippe, This is misprint in our docs, sorry. Will be fixed ASAP. saveNode and saveNodes methods actually take up to 4 arguments: virtual int saveNode(const char *name, const Ptr<Node> &node, int materials = 1, int binary = 0) const = 0; virtual int saveNodes(const char *name, const Vector< Ptr<Node> > &nodes, int materials = 1, int binary = 0) const = 0; materials and binary flags do the following: material means that info about material library will be saved (1) or not (0). By default enabled; binary means to store as plain xml (0) or in binary format (1). Can be used to save space for example (binary representation is generally smaller in size). Thanks for noticing that! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
p.vaz Posted August 26, 2016 Author Share Posted August 26, 2016 Thanks for the information Link to comment
Recommended Posts