Re: Add another 3D model to an existing 3D model?

by enkonyito » Sat Sep 25, 2021 4:39 am

The setModel method requires a parameter of Content type, like URLContent class. The supported content are the ones cited in the furniture import wizard, i.e. OBJ, 3DS, DAE or a ZIP file containing a file at this format. I don’t see how you could add a second model with these restrictions, unless you generate a model file containing both models.
Since it is possible to import an object into SH3D from a resource ([font=courier new]com/eteks/sweethome3d/io/resources/lightSource.obj[/font]), how to use the URLContent class ?

The goal would be to preload a scene with the model of a light and those of these sources before displaying them in the 3D preview.