Print at Dec 19, 2025, 7:44:41 PM

Posted by Puybaret at Jul 17, 2018, 1:35:12 AM
Re: Modify the materials of a piece of furniture
HomeMaterial objects are immutable like a few other ones in Sweet Home 3D like BackgroundImagel, Sash, TextStyle... instances. But I guess your question isn't about the advantages of immutability, right?
As you're a programmer, you could call the setModelMaterials in HomePieceOfFurniture class with a new array of HomeMaterial instances. What is the problem to do that?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator