git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2242
1f10aa63-cdf2-0310-b900-
c93c546f37ac
return (*dynamic_param_list().find("z_depth")->second)(t).get(Real());
}
return (*dynamic_param_list().find("z_depth")->second)(t).get(Real());
}
-#ifdef THIS_CODE_IS_NOT_USED
-Layer*
Layer::simple_clone()const
{
if(!book().count(get_name())) return 0;
Layer::simple_clone()const
{
if(!book().count(get_name())) return 0;
- Layer *ret = create(get_name()).get();
- ret->set_canvas(get_canvas());
+ Handle ret = create(get_name()).get();
+ ret->group_=group_;
+ //ret->set_canvas(get_canvas());
ret->set_description(get_description());
ret->set_description(get_description());
+ ret->set_active(active());
ret->set_param_list(get_param_list());
ret->set_param_list(get_param_list());
+ for(DynamicParamList::const_iterator iter=dynamic_param_list().begin();iter!=dynamic_param_list().end();++iter)
+ ret->connect_dynamic_param(iter->first, iter->second);
-#endif /* THIS_CODE_IS_NOT_USED */
Layer::Handle
Layer::clone(const GUID& deriv_guid) const
Layer::Handle
Layer::clone(const GUID& deriv_guid) const
** context until the final blend operation. */
virtual bool reads_context()const;
** context until the final blend operation. */
virtual bool reads_context()const;
-#ifdef THIS_CODE_IS_NOT_USED
//! Duplicates the Layer without duplicating the value nodes
//! Duplicates the Layer without duplicating the value nodes
- virtual Layer *simple_clone()const;
-#endif /* THIS_CODE_IS_NOT_USED */
+ virtual Handle simple_clone()const;