Add --layer as alias for --import-layer

This commit is contained in:
David Capello 2015-08-20 21:31:52 -03:00
parent a20f2c5d6e
commit 4112b295c8
3 changed files with 5 additions and 5 deletions

View File

@ -276,8 +276,8 @@ void App::initialize(const AppOptions& options)
splitLayers = true;
splitLayersSaveAs = true;
}
// --import-layer <layer-name>
else if (opt == &options.importLayer()) {
// --layer <layer-name>
else if (opt == &options.layer()) {
importLayer = value.value();
importLayerSaveAs = value.value();
}

View File

@ -37,7 +37,7 @@ AppOptions::AppOptions(int argc, const char* argv[])
, m_sheetHeight(m_po.add("sheet-height").requiresValue("<pixels>").description("Sprite sheet height"))
, m_sheetPack(m_po.add("sheet-pack").description("Use a packing algorithm to avoid waste of space\nin the texture"))
, m_splitLayers(m_po.add("split-layers").description("Import each layer of the next given sprite as\na separated image in the sheet"))
, m_importLayer(m_po.add("import-layer").requiresValue("<name>").description("Import just one layer of the next given sprite"))
, m_layer(m_po.add("layer").alias("import-layer").requiresValue("<name>").description("Include just the given layer in the sheet"))
, m_ignoreEmpty(m_po.add("ignore-empty").description("Do not export empty frames/cels"))
, m_borderPadding(m_po.add("border-padding").requiresValue("<value>").description("Add padding on the texture borders"))
, m_shapePadding(m_po.add("shape-padding").requiresValue("<value>").description("Add padding between frames"))

View File

@ -45,7 +45,7 @@ public:
const Option& sheetHeight() const { return m_sheetHeight; }
const Option& sheetPack() const { return m_sheetPack; }
const Option& splitLayers() const { return m_splitLayers; }
const Option& importLayer() const { return m_importLayer; }
const Option& layer() const { return m_layer; }
const Option& ignoreEmpty() const { return m_ignoreEmpty; }
const Option& borderPadding() const { return m_borderPadding; }
const Option& shapePadding() const { return m_shapePadding; }
@ -79,7 +79,7 @@ private:
Option& m_sheetHeight;
Option& m_sheetPack;
Option& m_splitLayers;
Option& m_importLayer;
Option& m_layer;
Option& m_ignoreEmpty;
Option& m_borderPadding;
Option& m_shapePadding;