/*! ========================================================================
-** Sinfg
+** Synfig
** Image Import Layer Implementation
** $Id: import.cpp,v 1.2 2005/03/19 04:26:42 darco Exp $
**
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
**
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
**
** === N O T E S ===========================================================
**
#endif
#include "import.h"
-#include <sinfg/string.h>
-#include <sinfg/time.h>
-#include <sinfg/context.h>
-#include <sinfg/paramdesc.h>
-#include <sinfg/renddesc.h>
-#include <sinfg/surface.h>
-#include <sinfg/value.h>
-#include <sinfg/valuenode.h>
-#include <sinfg/canvas.h>
+#include <synfig/string.h>
+#include <synfig/time.h>
+#include <synfig/context.h>
+#include <synfig/paramdesc.h>
+#include <synfig/renddesc.h>
+#include <synfig/surface.h>
+#include <synfig/value.h>
+#include <synfig/valuenode.h>
+#include <synfig/canvas.h>
#endif
-using namespace sinfg;
+using namespace synfig;
using namespace std;
using namespace etl;
/* === G L O B A L S ======================================================= */
-SINFG_LAYER_INIT(Import);
-SINFG_LAYER_SET_NAME(Import,"import");
-SINFG_LAYER_SET_LOCAL_NAME(Import,_("Import"));
-SINFG_LAYER_SET_CATEGORY(Import,_("Other"));
-SINFG_LAYER_SET_VERSION(Import,"0.1");
-SINFG_LAYER_SET_CVS_ID(Import,"$Id: import.cpp,v 1.2 2005/03/19 04:26:42 darco Exp $");
+SYNFIG_LAYER_INIT(Import);
+SYNFIG_LAYER_SET_NAME(Import,"import");
+SYNFIG_LAYER_SET_LOCAL_NAME(Import,_("Import"));
+SYNFIG_LAYER_SET_CATEGORY(Import,_("Other"));
+SYNFIG_LAYER_SET_VERSION(Import,"0.1");
+SYNFIG_LAYER_SET_CVS_ID(Import,"$Id: import.cpp,v 1.2 2005/03/19 04:26:42 darco Exp $");
/* === P R O C E D U R E S ================================================= */
//if(get_canvas()->get_file_path()==dirname(newfilename))
//{
- // sinfg::info("Image seems to be in local directory. Adjusting path...");
+ // synfig::info("Image seems to be in local directory. Adjusting path...");
// newfilename=basename(newfilename);
//}
while(basename(curpath)==".")curpath=dirname(curpath);
newfilename=relative_path(curpath,newfilename);
- sinfg::info("basename(curpath)=%s, Path adjusted to %s",basename(curpath).c_str(),newfilename.c_str());
+ synfig::info("basename(curpath)=%s, Path adjusted to %s",basename(curpath).c_str(),newfilename.c_str());
}
#endif
// If we are already loaded, don't reload
if(filename==newfilename && importer)
{
- sinfg::warning(strprintf(_("Filename seems to already be set to \"%s\" (%s)"),filename.c_str(),newfilename.c_str()));
+ synfig::warning(strprintf(_("Filename seems to already be set to \"%s\" (%s)"),filename.c_str(),newfilename.c_str()));
return true;
}
newimporter=Importer::open(get_canvas()->get_file_path()+ETL_DIRECTORY_SEPERATOR+basename(newfilename));
if(!newimporter)
{
- sinfg::error(strprintf("Unable to create an importer object with file \"%s\"",filename_with_path.c_str()));
+ synfig::error(strprintf("Unable to create an importer object with file \"%s\"",filename_with_path.c_str()));
surface.clear();
return false;
}
surface.clear();
if(!newimporter->get_frame(surface,Time(0)))
{
- sinfg::warning(strprintf("Unable to get frame from \"%s\"",filename_with_path.c_str()));
+ synfig::warning(strprintf("Unable to get frame from \"%s\"",filename_with_path.c_str()));
}
importer=newimporter;