I just found out that

model.materialLibrary.getMaterial("leaf-material").material = (flag) ?
wiremat : originalmat

works, but that changes all objects witht hat material.
I need the change to apply only to specific meshes.

Reply via email to