scene_synthesizer.exchange.export.export_scene

scene_synthesizer.exchange.export.export_scene(scene, file_obj, file_type=None, resolver=None, **kwargs)

Export a scene to the desired file format.

Parameters:
  • scene (scene_synthesizer.Scene) – Scene to export.

  • file_obj (str or None) – Filename or None. If None will return data.

  • file_type (str, optional) – If None, file_obj will be used to infer file_type. Defaults to None.

  • resolver (trimesh.resolvers.Resolver, optional) – If None, a FilePathResolver is used. Defaults to None.

Raises:
  • ValueError – If file format is unknown.

  • ValueError – If file_obj is None and file_type is None.

Returns:

Only if file_obj is None.

Return type:

str or bytes or dict