From: Carlos Lopez Date: Wed, 1 Sep 2010 15:32:44 +0000 (+0200) Subject: Merge branch 'genete_static_values' X-Git-Url: https://git.pterodactylus.net/?p=synfig.git;a=commitdiff_plain;h=d43ed398fd84b93b96eb91d91dafdf65c80537e6;hp=-c Merge branch 'genete_static_values' --- d43ed398fd84b93b96eb91d91dafdf65c80537e6 diff --combined synfig-core/src/modules/lyr_std/import.cpp index 567f756,d393f59..d37eecf --- a/synfig-core/src/modules/lyr_std/import.cpp +++ b/synfig-core/src/modules/lyr_std/import.cpp @@@ -67,6 -67,8 +67,8 @@@ SYNFIG_LAYER_SET_CVS_ID(Import,"$Id$") Import::Import() { time_offset=0; + Layer::Vocab voc(get_param_vocab()); + Layer::fill_static(voc); } Import::~Import() @@@ -86,6 -88,7 +88,7 @@@ Import::set_param(const String & param IMPORT(time_offset); if(param=="filename" && value.same_type_as(filename)) { + set_param_static(param, value.get_static()); if(!get_canvas()) { filename=value.get(filename); @@@ -162,7 -165,7 +165,7 @@@ } surface.clear(); - if(!newimporter->get_frame(surface,Time(0),trimmed,width,height,top,left)) + if(!newimporter->get_frame(surface,get_canvas()->rend_desc(),Time(0),trimmed,width,height,top,left)) { synfig::warning(strprintf("Unable to get frame from \"%s\"",filename_with_path.c_str())); } @@@ -187,8 -190,11 +190,11 @@@ Import::get_param(const String & param) { if(param=="filename") { + ValueBase ret(ValueBase::TYPE_STRING); + ret.set_static(get_param_static(param)); string curpath(cleanup_path(absolute_path(get_canvas()->get_file_path()))); - return relative_path(curpath,abs_filename); + ret=relative_path(curpath,abs_filename); + return ret; } } else @@@ -222,7 -228,7 +228,7 @@@ Import::set_time(Context context, Time { if(get_amount() && importer && importer->is_animated()) - importer->get_frame(surface,time+time_offset,trimmed,width,height,top,left); + importer->get_frame(surface,get_canvas()->rend_desc(),time+time_offset,trimmed,width,height,top,left); context.set_time(time); } @@@ -232,7 -238,7 +238,7 @@@ Import::set_time(Context context, Time { if(get_amount() && importer && importer->is_animated()) - importer->get_frame(surface,time+time_offset,trimmed,width,height,top,left); + importer->get_frame(surface,get_canvas()->rend_desc(),time+time_offset,trimmed,width,height,top,left); context.set_time(time,pos); }