Append multiple vedo objects into an array, and save all into one file
See original GitHub issueHi @marcomusy! A question regarding exporting mesh, splines, points, pictures, plots, for later visualization through show(). Is it possible to append multiple vedo objects into an array, and save all into one file. Instead of write() and load() all objects with a supported format?
I tried to write() multiple objects with the format .npz, but I didnt suceed when trying to load().
I did look into this example regarding exporting scenes,examples/other/export_numpy.py An error did occur when trying to save a image through ‘Picture(image)’ with a Mesh in a scene with the following line:
p= show(mesh, Picture(image), axes=1)
exportWindow('scene.npz')
p.close()
Error:
C:\Users\eivin\anaconda3\envs\project\lib\site-packages\vedo\utils.py:342: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray   faces = np.array(faces)
Also, when exporting only a mesh the example did work, but the colors in the pointcloud scene was not the same before and after exporting.
I did read this issue #357 It is somehow possible to merge multiple objects and then split it afterwards?
In advance, Thank you @marcomusy!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)

 Top Related Medium Post
Top Related Medium Post Top Related StackOverflow Question
Top Related StackOverflow Question
Great @marcomusy ! Thank you! This works fine! It is nice to recreate the plots without loading all the files.
what about this: