Re: How to import furniture in Applet
by Puybaret » Sun Apr 18, 2010 11:56 am
Short answer: read the information about parameters named
furnitureCatalogURLs and
texturesCatalogURLs in
SweetHome3DApplet javadoc.
If you look at the source code of the
Online version hosted on sweethome3d.eu, you'll see these two parameters are the files
furnitureCatalog.zip,
additionalFurnitureCatalog.zip and
texturesCatalog.zip.
The
PluginFurnitureCatalog.properties and
PluginTexturesCatalog.properties contained in these zip files reference
all the icon and 3D model files hosted on this server.
You can edit them and replace the code base
http://www.sweethome3d.eu/ by the one of your server and copy all the 3D model and icon files you want on your server.
Important note: in no case, I give you (or other people reading this thread) the authorization to host unmodified versions of the files furnitureCatalog.zip, additionalFurnitureCatalog.zip and texturesCatalog.zip on your server. You must reference 3D model and icon files hosted on your server, and not files on sweethome3d.eu server.
Don't host the files furnitureCatalog.zip, additionalFurnitureCatalog.zip and texturesCatalog.zip on your server if you don't understand the exact meaning of the required changes.
[01/18/2011 - Update from developer :
In version 2.4, the two furnitureResourcesURLBase and texturesResourcesURLBase parameters were added to SweetHome3DApplet class to simplify catalogs deployment.
Thus, the furnitureCatalog.zip, additionalFurnitureCatalog.zip and texturesCatalog.zip hosted on this server don't contain absolute URLs anymore but URLs relative to the furnitureResourcesURLBase and texturesResourcesURLBase parameters I added to the applet of the Online version.
Feel free to use these files unmodified now, as long as you take care to change the URL base to avoid using models hosted on sweethome3d.com server in your applet.]