Re: Modify the materials of a piece of furniture

by Puybaret » Mon Jul 16, 2018 11:35 pm

[font=courier new]HomeMaterial[/font] objects are immutable like a few other ones in Sweet Home 3D like [font=courier new]BackgroundImagel[/font], [font=courier new]Sash[/font], [font=courier new]TextStyle[/font]... instances. But I guess your question isn't about the advantages of immutability, right?
As you're a programmer, you could call the [font=courier new]setModelMaterials[/font] in HomePieceOfFurniture class with a new array of [font=courier new]HomeMaterial[/font] instances. What is the problem to do that?