ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
FBXCommand.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include "FBXCommand.h"
9 
10 #include "FBXFilter.h"
11 
12 constexpr char COMMAND_FBX[] = "FBX";
13 constexpr char COMMAND_FBX_EXPORT_FORMAT[] = "EXPORT_FMT";
14 
15 FBXCommand::FBXCommand() : Command("FBX", COMMAND_FBX) {}
16 
18  cmd.print("[FBX]");
19 
20  while (!cmd.arguments().empty()) {
21  const QString& arg = cmd.arguments().front();
22 
24  cmd.arguments().pop_front();
25 
26  QString format = cmd.arguments().takeFirst();
27 
28  if (format.isNull()) {
29  return cmd.error(QObject::tr("Missing parameter: FBX format "
30  "(string) after '%1'")
32  }
33 
34  cmd.print(QObject::tr("FBX format: %1").arg(format));
35 
37  }
38  }
39 
40  return true;
41 }
constexpr char COMMAND_FBX_EXPORT_FORMAT[]
Definition: FBXCommand.cpp:13
constexpr char COMMAND_FBX[]
Definition: FBXCommand.cpp:12
filament::Texture::InternalFormat format
bool process(ccCommandLineInterface &cmd) override
Main process.
Definition: FBXCommand.cpp:17
static void SetDefaultOutputFormat(QString format)
Definition: FBXFilter.cpp:457
Command line interface.
virtual QStringList & arguments()=0
Returns the list of arguments.
virtual void print(const QString &message) const =0
virtual bool error(const QString &message) const =0
static bool IsCommand(const QString &token, const char *command)
Test whether a command line token is a valid command keyword or not.