/* === M E T H O D S ======================================================= */
-Canvas::Canvas(const string &id):
+Canvas::Canvas(const String &id):
id_ (id),
+ version_ (CURRENT_CANVAS_VERSION),
cur_time_ (0),
is_inline_ (false),
is_dirty_ (true),
}
void
-Canvas::erase(Canvas::iterator iter)
+Canvas::erase(iterator iter)
{
if(!(*iter)->get_group().empty())
remove_group_pair((*iter)->get_group(),(*iter));
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)
{
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);
}
void
-Canvas::add_connection(Layer::LooseHandle layer, sigc::connection connection)
+Canvas::add_connection(etl::loose_handle<Layer> layer, sigc::connection connection)
{
connections_[layer].push_back(connection);
}
void
-Canvas::disconnect_connections(Layer::LooseHandle layer)
+Canvas::disconnect_connections(etl::loose_handle<Layer> layer)
{
std::vector<sigc::connection>::iterator iter;
for(iter=connections_[layer].begin();iter!=connections_[layer].end();++iter)