mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Added --html-parts-width/height to the command line.
This commit is contained in:
parent
a2b9549ce8
commit
7dd36a4d0e
2 changed files with 22 additions and 0 deletions
|
@ -141,6 +141,8 @@ bool lcApplication::Initialize(QList<QPair<QString, bool>>& LibraryPaths, bool&
|
|||
int ImageHeight = lcGetProfileInt(LC_PROFILE_IMAGE_HEIGHT);
|
||||
int ImageStart = 0;
|
||||
int ImageEnd = 0;
|
||||
int PartImagesWidth = -1;
|
||||
int PartImagesHeight = -1;
|
||||
QString ImageName;
|
||||
QString ModelName;
|
||||
QString CameraName;
|
||||
|
@ -246,6 +248,10 @@ bool lcApplication::Initialize(QList<QPair<QString, bool>>& LibraryPaths, bool&
|
|||
SaveHTML = true;
|
||||
ParseString(SaveHTMLName, false);
|
||||
}
|
||||
else if (Param == QLatin1String("--html-parts-width"))
|
||||
ParseInteger(PartImagesWidth);
|
||||
else if (Param == QLatin1String("--html-parts-height"))
|
||||
ParseInteger(PartImagesHeight);
|
||||
else if (Param == QLatin1String("-v") || Param == QLatin1String("--version"))
|
||||
{
|
||||
printf("LeoCAD Version " LC_VERSION_TEXT "\n");
|
||||
|
@ -273,6 +279,8 @@ bool lcApplication::Initialize(QList<QPair<QString, bool>>& LibraryPaths, bool&
|
|||
printf(" -3ds, --export-3ds <outfile.3ds>: Exports the model to 3D Studio 3DS format.\n");
|
||||
printf(" -dae, --export-collada <outfile.dae>: Exports the model to COLLADA DAE format.\n");
|
||||
printf(" -html, --export-html <folder>: Creates an HTML page for the model.\n");
|
||||
printf(" --html-parts-width <width>: Sets the part pictures width.\n");
|
||||
printf(" --html-parts-height <height>: Sets the part pictures height.\n");
|
||||
printf(" -v, --version: Output version information and exit.\n");
|
||||
printf(" -?, --help: Display this help and exit.\n");
|
||||
printf(" \n");
|
||||
|
@ -470,6 +478,12 @@ bool lcApplication::Initialize(QList<QPair<QString, bool>>& LibraryPaths, bool&
|
|||
if (!SaveHTMLName.isEmpty())
|
||||
Options.PathName = SaveHTMLName;
|
||||
|
||||
if (PartImagesWidth > 0)
|
||||
Options.PartImagesWidth = PartImagesWidth;
|
||||
|
||||
if (PartImagesHeight > 0)
|
||||
Options.PartImagesHeight = PartImagesHeight;
|
||||
|
||||
mProject->ExportHTML(Options);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,6 +110,14 @@ Exports the model to COLLADA DAE format.
|
|||
.BI "\-html [" path ]
|
||||
Creates an HTML page for the model.
|
||||
|
||||
.TP
|
||||
.BI "\-\-html\-parts\-width "width
|
||||
Sets the width of the part pictures when creating HTML pages to \fIwidth\fR.
|
||||
|
||||
.TP
|
||||
.BI "\-\-html\-parts\-height "height
|
||||
Sets the height of the part pictures when creating HTML pages to \fIheight\fR.
|
||||
|
||||
.SH ENVIRONMENT
|
||||
``LEOCAD_LIB'' may be set to the path of the parts library.
|
||||
|
||||
|
|
Loading…
Reference in a new issue