Print at Dec 19, 2025, 2:25:46 PM

Posted by enkonyito at Jul 18, 2018, 3:58:02 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, TextStylel... instances. But I guess your question isn't about the advantages of immutability, right?
No, I didn't know the advantages of immutability .

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?
Sometimes we miss out on the most obvious things.
I had not yet figured out how to use this method in my plugin.

Thanks
----------------------------------------
EnkoNyito