From 74558b9517862cb19d6b0800110c7e45ca2f193c Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 4 Jan 2017 14:22:38 +0100 Subject: [PATCH] Changed: Allow to define output bitmap size --HG-- branch : develop --- code/nel/tools/3d/textures_tool/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/nel/tools/3d/textures_tool/main.cpp b/code/nel/tools/3d/textures_tool/main.cpp index 997557ffc..91930845e 100644 --- a/code/nel/tools/3d/textures_tool/main.cpp +++ b/code/nel/tools/3d/textures_tool/main.cpp @@ -44,7 +44,7 @@ const CPoint Down(0, 1); const CPoint Left(-1, 0); const CPoint Right(1, 0); -const uint TextureSize = 4096; +uint TextureSize = 4096; const NLMISC::CRGBA DiscardColor = NLMISC::CRGBA::Red; const NLMISC::CRGBA KeepColor = NLMISC::CRGBA::Blue; @@ -113,6 +113,7 @@ int main(int argc, char **argv) args.addArg("f", "fill", "color or image", "Fill background part with color or image"); args.addArg("u", "uvmap", "", "Generate a UV Map texture from OBJ file"); args.addArg("w", "width", "width of border", "Width of the border to fill (default 0)"); + args.addArg("s", "size", "size of output bitmap", "Width and height of generated bitmap (default 4096)"); args.addArg("b", "background", "background color", "Color to use to fill background"); args.addArg("o", "output", "filename", "Output filename"); args.addAdditionalArg("filename", "File to process", true, true); @@ -123,6 +124,12 @@ int main(int argc, char **argv) std::string output = args.haveArg("o") ? args.getArg("o").front() : ""; + if (args.haveArg("s")) + { + // size of generated bitmap + NLMISC::fromString(args.getArg("s").front(), TextureSize); + } + if (args.haveArg("c")) { // colorize