from pygltflib import GLTF2

filename = (
    "Z:/projekte/284_COM_bubble/009_zeitraum/export/raum_01_salon/raum_01_salon.glb"
)
glb = GLTF2().load(filename)
mats = glb.materials
for m in glb.materials:
    if m.name == "transparent":
        m.alphaMode = "BLEND"
        m.doubleSided = True
        m.pbrMetallicRoughness.baseColorFactor = [1.0, 1.0, 1.0, 0.5]
    if m.name == "paper_single":
        m.doubleSided = True
        m.pbrMetallicRoughness.baseColorFactor = [1.0, 1.0, 1.0, 1.0]
    if m.name == "briefe":
        m.doubleSided = True
        m.pbrMetallicRoughness.baseColorFactor = [1.0, 1.0, 1.0, 1.0]
# glb.materials["transparent"].doubleSided=True
# glb.materials["paper_single"].doubleSided=True
glb.save(filename)
