From: dooglus Date: Fri, 11 Jan 2008 15:05:50 +0000 (+0000) Subject: When optimize_layers() recreates Paste Canvas layers, it needs to make sure it copies... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=36b62b6ea64fe871356d77e7aac1f53b9b33cebb;p=synfig.git When optimize_layers() recreates Paste Canvas layers, it needs to make sure it copies dynamic parameters if the Paste Canvas layer is being duplicated by a Duplicate layer. git-svn-id: http://svn.voria.com/code@1331 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/canvas.cpp b/synfig-core/trunk/src/synfig/canvas.cpp index b8e33a0..9322d79 100644 --- a/synfig-core/trunk/src/synfig/canvas.cpp +++ b/synfig-core/trunk/src/synfig/canvas.cpp @@ -1018,6 +1018,11 @@ Canvas::get_meta_data_keys()const return ret; } +/* note - the "Motion Blur" and "Duplicate" layers need the dynamic + parameters of any PasteCanvas layers they loop over to be + maintained. When the variables in the following function + refer to "motion blur", they mean either of these two + layers. */ void synfig::optimize_layers(Context context, Canvas::Handle op_canvas, bool seen_motion_blur_in_parent) { @@ -1046,7 +1051,7 @@ synfig::optimize_layers(Context context, Canvas::Handle op_canvas, bool seen_mot if(value.get_type()==ValueBase::TYPE_REAL && value.get(Real())==0) continue; - if(layer->get_name()=="MotionBlur") + if(layer->get_name()=="MotionBlur" || layer->get_name()=="duplicate") { float z_depth(layer->get_z_depth()*1.0001+i);