mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 03:59:19 +02:00
feat(editor): -generate-nodebank-previews mode: png previews of the node bank models, or of the entries given with -entries, drawn offscreen and without a window by the full renderer: square, -resolution 1024 by default, the model in perspective from the front, side and above, fitted to the image less -margin pixels (64 by default) on white background, lit, with materials and with self shadows unless -no-shadows; saved in textures/previews/nodebank under the path of the model with the skin; software rendering of mesa when the graphics driver gives no gl 3.3 or with -software
This commit is contained in:
9
EU07.cpp
9
EU07.cpp
@@ -34,6 +34,7 @@ Stele, firleju, szociu, hunter, ZiomalCl, OLI_EU and others
|
||||
|
||||
void export_e3d_standalone(std::string in, std::string out, int flags, bool dynamic);
|
||||
int export_btf_standalone(std::string in, std::string out);
|
||||
int generate_nodebank_previews(int Argc, char *Argv[]);
|
||||
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
@@ -99,6 +100,14 @@ int main(int argc, char *argv[])
|
||||
int dynamic = std::stoi(std::string(argv[5]));
|
||||
export_e3d_standalone(in, out, flags, dynamic);
|
||||
}
|
||||
// standalone generation of preview images of the node bank models: -generate-nodebank-previews [options]
|
||||
else if (argc >= 2 && std::string(argv[1]) == "-generate-nodebank-previews")
|
||||
{
|
||||
auto const result{generate_nodebank_previews(argc, argv)};
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
std::_Exit(result);
|
||||
}
|
||||
// standalone conversion of text terrain file to binary format: -btf -s <text file> [-o <binary file>]
|
||||
else if (argc >= 4 && std::string(argv[1]) == "-btf")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user