I'm exporting a 3D model to GLB format using pythonOCC. During export, I store custom metadata on each face using TDataStd_NamedData:
...
user_data = TDataStd_NamedData.Set(some_shape_label)
user_data.SetString("some_variable", str(value))
....
This correctly saves as extras on each GLB node.
Now when I try to read it back using RWGltf_CafReader and TDataStd_NamedData, the attribute is never found.
.....
shape = shape_tool.GetShape(label)
named_data = TDataStd_NamedData()
if label.FindAttribute(TDataStd_NamedData.GetID(), named_data):
if named_data.HasStrings():
print("Yes") # does not print
Questions:
- Does RWGltf_CafReader actually import extras ?
- If not, what is the correct way to read back GLB extras / user data in pythonOCC, along with the shape at the same time.
I'm exporting a 3D model to GLB format using pythonOCC. During export, I store custom metadata on each face using TDataStd_NamedData:
This correctly saves as extras on each GLB node.
Now when I try to read it back using RWGltf_CafReader and TDataStd_NamedData, the attribute is never found.
Questions: