X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Ftool%2Fmain.cpp;h=01f4b645b3797a701cde09c18f85022ebf584d16;hb=66f4173f0900b23b5907953a88e0f00a62053119;hp=412a5ba82fb4e50eac89d7ec7802be36d7d2cea1;hpb=cc54c38609ee9745ad678e5e9b9d7d2912be9c95;p=synfig.git diff --git a/synfig-core/trunk/src/tool/main.cpp b/synfig-core/trunk/src/tool/main.cpp index 412a5ba..01f4b64 100644 --- a/synfig-core/trunk/src/tool/main.cpp +++ b/synfig-core/trunk/src/tool/main.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -34,6 +35,7 @@ #include #include #include +#include #include #include @@ -56,18 +58,26 @@ using namespace synfig; /* === M A C R O S ========================================================= */ +#ifdef ENABLE_NLS +#undef _ +#define _(x) gettext(x) +#else +#undef _ +#define _(x) (x) +#endif + enum exit_code { - SYNFIGTOOL_OK =0, - SYNFIGTOOL_FILENOTFOUND =1, - SYNFIGTOOL_BORRED =2, - SYNFIGTOOL_HELP =3, - SYNFIGTOOL_UNKNOWNARGUMENT =4, - SYNFIGTOOL_UNKNOWNERROR =5, - SYNFIGTOOL_INVALIDTARGET =6, - SYNFIGTOOL_RENDERFAILURE =7, - SYNFIGTOOL_BLANK =8, - SYNFIGTOOL_BADVERSION =9, + SYNFIGTOOL_OK = 0, + SYNFIGTOOL_FILENOTFOUND = 1, + SYNFIGTOOL_BORED = 2, + SYNFIGTOOL_HELP = 3, + SYNFIGTOOL_UNKNOWNARGUMENT = 4, + SYNFIGTOOL_UNKNOWNERROR = 5, + SYNFIGTOOL_INVALIDTARGET = 6, + SYNFIGTOOL_RENDERFAILURE = 7, + SYNFIGTOOL_BLANK = 8, + SYNFIGTOOL_BADVERSION = 9, SYNFIGTOOL_MISSINGARGUMENT =10 }; @@ -122,7 +132,7 @@ public: } virtual bool - amount_complete(int current, int total) + amount_complete(int /*current*/, int /*total*/) { return true; } @@ -248,6 +258,19 @@ struct Job int quality; bool sifout; + bool list_canvases; + + bool canvas_info, canvas_info_all, canvas_info_time_start, canvas_info_time_end, canvas_info_frame_rate, + canvas_info_frame_start, canvas_info_frame_end, canvas_info_w, canvas_info_h, canvas_info_image_aspect, + canvas_info_pw, canvas_info_ph, canvas_info_pixel_aspect, canvas_info_tl, canvas_info_br, + canvas_info_physical_w, canvas_info_physical_h, canvas_info_x_res, canvas_info_y_res, canvas_info_span, + canvas_info_interlaced, canvas_info_antialias, canvas_info_clamp, canvas_info_flags, canvas_info_focus, + canvas_info_bg_color, canvas_info_metadata; + + Job() + { + canvas_info = canvas_info_all = canvas_info_time_start = canvas_info_time_end = canvas_info_frame_rate = canvas_info_frame_start = canvas_info_frame_end = canvas_info_w = canvas_info_h = canvas_info_image_aspect = canvas_info_pw = canvas_info_ph = canvas_info_pixel_aspect = canvas_info_tl = canvas_info_br = canvas_info_physical_w = canvas_info_physical_h = canvas_info_x_res = canvas_info_y_res = canvas_info_span = canvas_info_interlaced = canvas_info_antialias = canvas_info_clamp = canvas_info_flags = canvas_info_focus = canvas_info_bg_color = canvas_info_metadata = false; + }; }; typedef list arg_list_t; @@ -257,9 +280,7 @@ void guid_test() { cout<<"GUID Test"<=1) + + cerr << endl << _("syntax: ") << progname << " [DEFAULT OPTIONS] ([SIF FILE] [SPECIFIC OPTIONS])..." << endl << endl; + + if(amount == 0) + Argument("--help",NULL,_("Print out usage and syntax info")); + else { Argument("-t","",_("Specify output target (Default:unknown)")); Argument("-w","",_("Set the image width (Use zero for file default)")); @@ -314,14 +337,18 @@ void display_help(int amount) Argument("-c","",_("Render the canvas with the given id instead of the root.")); Argument("-o","",_("Specify output filename")); Argument("-T","<# of threads>",_("Enable multithreaded renderer using specified # of threads")); - Argument("-b",NULL,_("Print Benchmarks")); - Argument("--fps","",_("Set the frame rate")); Argument("--time","