Print at Dec 20, 2025, 11:05:06 AM View all posts in this thread on one page
Posted by josleen at May 12, 2011, 10:50:47 AM
sad   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 !!!

Posted by Puybaret at May 14, 2011, 1:45:23 PM
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