X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer.cpp;h=9edaffe906645f931322f4e285a0f1c07b0bf415;hb=756c0d29ac1742f231e6615f9a577e574e35a4af;hp=725f11867d8ff3cb808372a7dbedb05bf8bb5dbc;hpb=48bbcdc963c394122d294519d43330e046433129;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer.cpp b/synfig-core/trunk/src/synfig/layer.cpp index 725f118..9edaffe 100644 --- a/synfig-core/trunk/src/synfig/layer.cpp +++ b/synfig-core/trunk/src/synfig/layer.cpp @@ -6,7 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -45,6 +45,7 @@ #include "layer_polygon.h" #include "layer_pastecanvas.h" #include "layer_motionblur.h" +#include "layer_duplicate.h" #include "valuenode_const.h" @@ -103,6 +104,7 @@ Layer::subsys_init() INCLUDE_LAYER(Layer_PasteCanvas); LAYER_ALIAS(Layer_PasteCanvas, "paste_canvas"); INCLUDE_LAYER(Layer_Polygon); LAYER_ALIAS(Layer_Polygon, "Polygon"); INCLUDE_LAYER(Layer_MotionBlur); LAYER_ALIAS(Layer_MotionBlur, "motion_blur"); + INCLUDE_LAYER(Layer_Duplicate); #undef INCLUDE_LAYER @@ -369,6 +371,12 @@ Layer::clone(const GUID& deriv_guid) const return ret; } +bool +Layer::reads_context() const +{ + return false; +} + Rect Layer::get_full_bounding_rect(Context context)const { @@ -565,3 +573,14 @@ Layer::get_group()const { return group_; } + +const String +Layer::get_param_local_name(const String ¶m_name)const +{ + ParamVocab vocab = get_param_vocab(); + // loop to find the parameter in the parameter vocab - this gives us its local name + for (ParamVocab::iterator iter = vocab.begin(); iter != vocab.end(); iter++) + if (iter->get_name() == param_name) + return iter->get_local_name(); + return String(); +}