Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 2
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3232 times and has 1 reply Next Thread
josleen
Newbie



222
Joined: Feb 27, 2011
Post Count: 10
Status: Offline
Reply to this Post  Reply with Quote 
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 !!!
[May 12, 2011, 10:50:47 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9427
Status: Offline
Reply to this Post  Reply with Quote 
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
[May 14, 2011, 1:45:23 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved