|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: Modify the materials of a piece of furniture » » » » Post: Re: Modify the materials of a piece of furniture |
Print at Dec 19, 2025, 9:16:08 PM |
| Posted by enkonyito at Jul 18, 2018, 1: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 |
|
|
Current timezone is GMT Dec 19, 2025, 9:16:08 PM |