MCPcopy Create free account
hub / github.com/Sin3DM/Sin3DM / tree_postprocessor

Function tree_postprocessor

src/encoding/utils3d.py:126–131  ·  view source on GitHub ↗
(tree)

Source from the content-addressed store, hash-verified

124 )
125
126 def tree_postprocessor(tree):
127 # FIXME: hardcode the material
128 tree["materials"][0]["pbrMetallicRoughness"]["baseColorFactor"] = [1.0, 1.0, 1.0, 1.0]
129 tree["materials"][0]["pbrMetallicRoughness"]["metallicFactor"] = 0.0
130 tree["materials"][0]["pbrMetallicRoughness"]["roughnessFactor"] = 1.0
131 tree["materials"][0]["doubleSided"] = True
132
133 with open(fname, 'wb') as f:
134 mesh.export(file_obj=f, file_type='glb', tree_postprocessor=tree_postprocessor)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected