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 3777 times and has 1 reply Next Thread
tsionik
Newbie




Joined: Sep 29, 2011
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Add a new texture feature

Dear SH3D Community,

I want to create a new feature in SH3D. Specifically, if for example I have a simple cube, I would have the choice to put a different texture in every side of the cube(in current version os SH3D, it is possible to change only the whole texture of an object). I have to mention that my quest is not to do something like that in any object but only in simple objects, such as cubes.

Is that possible with some way? In which classes I should focus and how difficult it could be?

Thanks!
[Nov 8, 2011, 11:39:17 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: 9420
Status: Offline
Reply to this Post  Reply with Quote 
Re: Add a new texture feature

That could be a nice plug-in. smile
The difficulty depends on your programming skills, but you could reuse many classes of Sweet Home 3D to help you achieve it faster. To avoid having too much to master, I would:
- learn how to program a new plug-in,
- program a dialog box that would let the user choose the image on each side of the cube,
- generate a cube at OBJ + MTL formats (generate one with Sweet Home 3D or better with an other 3D program and you'll understand quickly what it requires),
- gather the OBJ, MTL and textures files in a zip file,
- create a modifiable CatalogPieceOfFurniture instance, and add it to the catalog (and/or add it to home after that if you want it to appear in the plan), reproducing the behavior of the finish method in ImportedFurnitureWizardController class.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Nov 8, 2011, 3:03:53 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