-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
ACTION_INIT(Action::LayerParamConnect);
ACTION_SET_NAME(Action::LayerParamConnect,"layer_param_connect");
ACTION_INIT(Action::LayerParamConnect);
ACTION_SET_NAME(Action::LayerParamConnect,"layer_param_connect");
ACTION_SET_TASK(Action::LayerParamConnect,"connect");
ACTION_SET_CATEGORY(Action::LayerParamConnect,Action::CATEGORY_LAYER|Action::CATEGORY_VALUENODE);
ACTION_SET_PRIORITY(Action::LayerParamConnect,0);
ACTION_SET_VERSION(Action::LayerParamConnect,"0.0");
ACTION_SET_TASK(Action::LayerParamConnect,"connect");
ACTION_SET_CATEGORY(Action::LayerParamConnect,Action::CATEGORY_LAYER|Action::CATEGORY_VALUENODE);
ACTION_SET_PRIORITY(Action::LayerParamConnect,0);
ACTION_SET_VERSION(Action::LayerParamConnect,"0.0");
Action::LayerParamConnect::get_param_vocab()
{
ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
Action::LayerParamConnect::get_param_vocab()
{
ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
.set_local_name(_("Layer"))
);
ret.push_back(ParamDesc("layer",Param::TYPE_LAYER)
.set_local_name(_("Layer"))
);
ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
.set_local_name(_("ValueNode"))
);
ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
.set_local_name(_("ValueNode"))
);
synfig::warning("Action::LayerParamConnect: Missing \"value_node\"");
if(param_name.empty())
synfig::warning("Action::LayerParamConnect: Missing \"param\"");
synfig::warning("Action::LayerParamConnect: Missing \"value_node\"");
if(param_name.empty())
synfig::warning("Action::LayerParamConnect: Missing \"param\"");
if(!layer->set_param(param_name,(*value_node)(0)))
throw Error(_("Bad connection"));
if(!layer->set_param(param_name,(*value_node)(0)))
throw Error(_("Bad connection"));
layer->disconnect_dynamic_param(param_name);
layer->set_param(param_name,old_value);
}
layer->disconnect_dynamic_param(param_name);
layer->set_param(param_name,old_value);
}
if(get_canvas_interface())
{
get_canvas_interface()->signal_layer_param_changed()(layer,param_name);
if(get_canvas_interface())
{
get_canvas_interface()->signal_layer_param_changed()(layer,param_name);