Elaztek Developer Hub
Blamite Game Engine - Tool (Library)
A command-line utility that aids in the creation of Blamite Cache (.map) Files.
BulkImportModelFolderCommand.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Strings/components/utils/io/io.h>
4 #include <Strings/components/utils/string/string.h>
5 #include <Strings/components/utils/converters/converters.h>
6 #include <Strings/components/logger/logger.h>
7 
8 #include <HEKGuerilla/components/tags/importers/bitmap/bitmap.h>
9 #include <HEKGuerilla/components/tags/tags.h>
10 #include <HEKGuerilla/components/settings/config/config.h>
11 
12 #include "../ToolCommand.hpp"
13 #include "../console.h"
14 
15 #ifdef TOOL_LIB_EXPORTS
16 #define TOOL_LIB_API __declspec(dllexport)
17 #else
18 #define TOOL_LIB_API __declspec(dllimport)
19 #endif
20 
27 {
28 public:
30  {
31  command = "bulk-import-model-folder";
32  syntax = "bulk-import-model-folder <directory> <output directory>";
33  description = "scans through a given directory and imports any detected render, physics, collision, and impostor models. this will also create a hlmt [model] tag ready to be applied to an object"
34  "for other import options and methods, see the other model import commands. "
35  "supported formats: -- TBA --";
36  }
37 
38  int execute(std::vector<std::string> args)
39  {
40  Guerilla::Tags::LoadPlugins();
41 
42  std::string input_directory = "";
43  std::string output_directory = "";
44 
45  if (args.size() == 0)
46  {
47  BlamStrings::Logger::LogEvent("no input directory path was provided, cannot import models", BlamLogLevel::Warning);
48  return -1;
49  }
50 
51  if (args.size() == 1)
52  {
53  BlamStrings::Logger::LogEvent("no output directory path was provided, cannot import models", BlamLogLevel::Warning);
54  return -1;
55  }
56 
57  if (args.size() > 3)
58  {
59  BlamStrings::Logger::LogEvent("too many arguments specified - skipping import. check your input and try again. "
60  "for additional help, use 'tool.exe help bulk-import-model-folder'.", BlamLogLevel::Warning);
61  return -1;
62  }
63 
64  BlamStrings::Logger::LogEvent("not yet implemented.", WSV_WARNING);
65 
66  Guerilla::Tags::ReleasePlugins();
67 
68  //BlamStrings::Logger::LogEvent("finished.");
69  return 0;
70  }
71 };
BulkImportModelFolderCommand::execute
int execute(std::vector< std::string > args)
Executes the command.
Definition: BulkImportModelFolderCommand.hpp:38
BulkImportModelFolderCommand::BulkImportModelFolderCommand
BulkImportModelFolderCommand()
Definition: BulkImportModelFolderCommand.hpp:29
BulkImportModelFolderCommand
Class for the bulk-import-model-folder command.
Definition: BulkImportModelFolderCommand.hpp:26
ToolCommand::syntax
std::string syntax
The syntax of the command. This should include the command name, as well as any arguments.
Definition: ToolCommand.hpp:19
ToolCommand::command
std::string command
The name of the command.
Definition: ToolCommand.hpp:18
ToolCommand
Base class representing a Tool command.
Definition: ToolCommand.hpp:15
ToolCommand::description
std::string description
A description of the command.
Definition: ToolCommand.hpp:20