Re: Modify the materials of a piece of furniture

by enkonyito » Wed Jul 18, 2018 1:58 am

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