Browse Source

sceneconverter: doc++, TODO++.

pull/168/head
Vladimír Vondruš 2 years ago
parent
commit
368cbf1676
  1. 12
      src/Magnum/SceneTools/sceneconverter.cpp

12
src/Magnum/SceneTools/sceneconverter.cpp

@ -146,7 +146,7 @@ magnum-sceneconverter --info-converter -C GltfSceneConverter -c copyright="Me &
Processing a glTF file and removing duplicates in all its meshes: Processing a glTF file and removing duplicates in all its meshes:
@code{.sh} @code{.sh}
magnum-sceneconverter scene.gltf --remove-duplicates scene.deduplicated.gltf magnum-sceneconverter scene.gltf --remove-duplicate-vertices scene.deduplicated.gltf
@endcode @endcode
Processing a glTF file, resizing all its images to 512x512 with Processing a glTF file, resizing all its images to 512x512 with
@ -821,9 +821,11 @@ well, the IDs reference attributes of the first mesh.)")
if(importer->defaultScene() != -1 || importer->sceneCount()) { if(importer->defaultScene() != -1 || importer->sceneCount()) {
Containers::Optional<Trade::SceneData> scene; Containers::Optional<Trade::SceneData> scene;
{ {
/** @todo make it possible to choose the scene, or possibly /** @todo once the required SceneTools APIs exist, rework
fail if there are multiple scenes but no default one this to concatenate only what actually makes sense (and
and require the user to pick? */ thus preserve the (multi-)scene hierarchy, with the
original behavior only being achievable if everything
except meshes and scene hierarchy is filtered away */
const UnsignedInt defaultScene = importer->defaultScene() == -1 ? 0 : importer->defaultScene(); const UnsignedInt defaultScene = importer->defaultScene() == -1 ? 0 : importer->defaultScene();
Trade::Implementation::Duration d{importConversionTime}; Trade::Implementation::Duration d{importConversionTime};
if(!(scene = importer->scene(defaultScene))) { if(!(scene = importer->scene(defaultScene))) {
@ -1193,6 +1195,8 @@ well, the IDs reference attributes of the first mesh.)")
/** @todo make it possible to filter this on the command line, once the /** @todo make it possible to filter this on the command line, once the
converters receive this for SceneData, MaterialData and TextureData converters receive this for SceneData, MaterialData and TextureData
as well */ as well */
/** @todo and then also test all branching on Names in direct image,
mesh, material and scene import */
Trade::SceneContents contents = ~Trade::SceneContents{}; Trade::SceneContents contents = ~Trade::SceneContents{};
/* If there are any loose images from previous conversion steps, add /* If there are any loose images from previous conversion steps, add

Loading…
Cancel
Save