ddg.conversion.indexedfaceset.obj module

ddg.conversion.indexedfaceset.obj.obj_to_ifs(filename, attribute_name)[source]

Convert an obj file into an IndexedFaceSet. If there are multiple objects in the obj file, the output is a dictionary, whose keys are the object names. If only one object is in the obj file, the corresponding IndexedFaceSet is returned directly.

Parameters:
filenamestring

(path and) name of the obj file

attribute_namestring

Name of the vertex attribute storing the coordinates

Returns:
dict

dict of ddg.datastructures.IndexedFaceSet for each object data in the obj file. The keys are the names of the objects.