ParticleMesh has any method to clone/shared?

Hi guys,



ParticleMesh object has any method to clone the particles?



Scratching my head! :?

Hi guys,



Could anyone give me some idea to quick fix this problem?



Thanks a bunch!

you could save it to a binary form and then load it multiple times with BinaryExporter/Importer.

Try an imposter node ??

Core-Dump said:

you could save it to a binary form and then load it multiple times with BinaryExporter/Importer.

I think we have CloneImportExport for that, not sure if it works for particles though.

Thank guys!



How to implement by that way?



Could you give some snippet (example)?



Thanks a lot!

I try to use BinaryImporter/BinaryExporter by this way:



              ByteArrayOutputStream out = new ByteArrayOutputStream();

              try {

BinaryExporter.getInstance().save(manager, out);

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}



ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());

try {

ParticleMesh particle = (ParticleMesh) BinaryImporter.getInstance().load(in);

out.close();

in.close();

return particle;

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}



Note: manager is a particle mesh object.



However, It does not work!