Print at Dec 15, 2025, 6:43:52 PM

Posted by Puybaret at Apr 26, 2018, 2:43:14 PM
Re: How to set the material file name programatically
You shouldn't rely on these numbers.
In current implementation, "74" means that it's the material of the 74th wall in your home, and "212" is the 212th shape being exported in the OBJ file. If ever you remove or simply change a wall, you might get different numbers.
If you want to set the texture by program on each wall, either you read a SH3D file, update its content and save it with Sweet Home 3D Java API, or you study SH3D file format to update such files with other programming languages (quickly said, a SH3D file is a ZIP file with a Home.xml entry that respects SweetHome3D.dtd + 3D models + images).
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator