222
Joined: Feb 27, 2011
Post Count: 10
Status:
Offline
How to access new 3D model from code
Hi,
I create a 3D model and imported it via the furniture import in the Miscellaneous category. I tried to access the model using catalog.getCategory(6).getPieceOfFurniture(5) in HomePieceOfFurniture. But it would only show the default models no matter what. It is logical since the catalog contains only the default models. Now, how can I access my new model using the code? I am developing a plugin so I dont want to change the source code? Suggest Please !!!
France
Joined: Nov 7, 2005
Post Count: 9427
Status:
Offline
Re: How to access new 3D model from code
To get the last piece of furniture added to the catalog, I would add a CollectionListener to the catalog instance returned by getUserPreferences().getFurnitureCatalog().
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator