When optimize_layers() recreates Paste Canvas layers, it needs to make sure it copies...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 11 Jan 2008 15:05:50 +0000 (15:05 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 11 Jan 2008 15:05:50 +0000 (15:05 +0000)
git-svn-id: http://svn.voria.com/code@1331 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/canvas.cpp

index b8e33a0..9322d79 100644 (file)
@@ -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);