15 using std::unique_ptr;
29 int main(
int argc,
char** argv)
31 Console::println(
string(
"dumpmodel ") + Version::getVersion());
32 Console::println(Version::getCopyright());
35 Console::println(
"Usage: dumpmodel sourcefile");
36 Application::exit(Application::EXITCODE_FAILURE);
38 string fileName = string(argv[1]);
40 Console::println(
"Loading source model: " + fileName);
41 auto model = unique_ptr<Model>(
43 FileSystem::getInstance()->getPathName(fileName),
44 FileSystem::getInstance()->getFileName(fileName)
47 Console::println(
"Animation setups:");
48 for (
const auto& [srcAnimationSetupId, srcAnimationSetup]: model->getAnimationSetups()) {
49 if (srcAnimationSetup->getOverlayFromNodeId().length() == 0) {
51 "Base animation: id = '" + srcAnimationSetup->getId() +
"', " +
52 "start frame: " + to_string(srcAnimationSetup->getStartFrame()) +
", " +
53 "end frame: " + to_string(srcAnimationSetup->getEndFrame()) +
", " +
54 "loop: " + to_string(srcAnimationSetup->isLoop()) +
", " +
55 "speed: " + to_string(srcAnimationSetup->getSpeed())
59 "Overlay animation: id = '" + srcAnimationSetup->getId() +
"', " +
60 "overlay node: '" + srcAnimationSetup->getOverlayFromNodeId() +
"', " +
61 "start frame: " + to_string(srcAnimationSetup->getStartFrame()) +
", " +
62 "end frame: " + to_string(srcAnimationSetup->getEndFrame()) +
", " +
63 "loop: " + to_string(srcAnimationSetup->isLoop()) +
", " +
64 "speed: " + to_string(srcAnimationSetup->getSpeed())
69 Console::println(
"An error occurred: " +
string(exception.what()));
73 Application::exit(Application::EXITCODE_SUCCESS);
Application base class, please make sure to allocate application on heap to have correct application ...
Representation of a 3D model.
File system singleton class.
int main(int argc, char **argv)
std::exception Exception
Exception base class.