本文整理汇总了C++中action::Param::get_layer方法的典型用法代码示例。如果您正苦于以下问题:C++ Param::get_layer方法的具体用法?C++ Param::get_layer怎么用?C++ Param::get_layer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类action::Param
的用法示例。
在下文中一共展示了Param::get_layer方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool
Action::LayerMove::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
layer=param.get_layer();
return true;
}
if(name=="new_index" && param.get_type()==Param::TYPE_INTEGER)
{
new_index=param.get_integer();
return true;
}
if(name=="dest_canvas" && param.get_type()==Param::TYPE_CANVAS)
{
dest_canvas=param.get_canvas();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例2:
bool
Action::LayerResetPose::set_param(const synfig::String& name, const Action::Param ¶m)
{
if (name=="layer"
&& param.get_type()==Param::TYPE_LAYER
&& param.get_layer()->get_name() == "skeleton_deformation" )
{
layers.push_back(param.get_layer());
return true;
}
if(name=="time" && param.get_type()==Param::TYPE_TIME)
{
time=param.get_time();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例3:
bool
Action::LayerMakeBLine::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
layer = param.get_layer();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例4:
bool
Action::LayerLower::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
layers.push_back(param.get_layer());
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例5:
bool
Action::LayerRemove::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
std::pair<synfig::Layer::Handle,int> layer_pair;
layer_pair.first=param.get_layer();
layer_list.push_back(layer_pair);
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例6:
bool
Action::TimepointsMove::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="addlayer" && param.get_type()==Param::TYPE_LAYER)
{
//add a layer to the list
sel_layers.push_back(param.get_layer());
//synfig::info("action got layer");
return true;
}
if(name=="addcanvas" && param.get_type()==Param::TYPE_CANVAS)
{
//add a layer to the list
sel_canvases.push_back(param.get_canvas());
//synfig::info("action got canvas");
return true;
}
if(name=="addvaluedesc" && param.get_type()==Param::TYPE_VALUEDESC)
{
//add a layer to the list
sel_values.push_back(param.get_value_desc());
//synfig::info("action got valuedesc");
return true;
}
if(name=="addtime" && param.get_type()==Param::TYPE_TIME)
{
//add a layer to the list
sel_times.insert(param.get_time());
//synfig::info("action got time");
return true;
}
if(name=="deltatime" && param.get_type()==Param::TYPE_TIME)
{
timemove = param.get_time();
//synfig::info("action got time to move");
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例7:
bool
Action::LayerSetDesc::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
layer=param.get_layer();
return true;
}
if(name=="new_description" && param.get_type()==Param::TYPE_STRING)
{
new_description=param.get_string();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例8:
bool
Action::LayerAddFrame::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
layer_switch = etl::handle<Layer_Switch>::cast_dynamic(param.get_layer());
if (layer_switch)
{
layer_base = layer_switch->get_current_layer();
if (!layer_base) layer_switch = NULL;
}
return layer_switch;
}
if(name=="time" && param.get_type()==Param::TYPE_TIME)
{
time=param.get_time();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例9:
bool
Action::LayerEncapsulate::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
layers.push_back(param.get_layer());
return true;
}
if(name=="description" && param.get_type()==Param::TYPE_STRING)
{
description = param.get_string();
return true;
}
if(name=="children_lock" && param.get_type()==Param::TYPE_BOOL)
{
children_lock = param.get_bool();
return true;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例10: String
bool
Action::LayerEmbed::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
Layer::Handle layer = param.get_layer();
etl::handle<synfig::Layer_PasteCanvas> layer_pastecanvas
= etl::handle<synfig::Layer_PasteCanvas>::cast_dynamic(layer);
if (layer_pastecanvas)
{
Canvas::Handle canvas = layer_pastecanvas->get_sub_canvas();
if (canvas && canvas->is_root())
{
this->layer_pastecanvas = layer_pastecanvas;
return true;
}
}
Layer::Handle layer_import = layer;
if (layer_import->get_param_list().count("filename") != 0)
{
String filename = layer_import->get_param("filename").get(String());
// TODO: literal "container:"
if (!filename.empty()
&& filename.substr(0, String("#").size()) != "#"
&& layer_import->dynamic_param_list().count("filename") == 0)
{
this->layer_import = layer_import;
return true;
}
}
return false;
}
return Action::CanvasSpecific::set_param(name,param);
}
示例11:
bool
Action::LayerEmbed::set_param(const synfig::String& name, const Action::Param ¶m)
{
if(name=="layer" && param.get_type()==Param::TYPE_LAYER)
{
Layer::Handle layer = param.get_layer();
etl::handle<synfig::Layer_PasteCanvas> layer_pastecanvas
= etl::handle<synfig::Layer_PasteCanvas>::cast_dynamic(layer);
if (layer_pastecanvas)
{
Canvas::Handle canvas = layer_pastecanvas->get_sub_canvas();
if (canvas && canvas->is_root())
{
this->layer_pastecanvas = layer_pastecanvas;
return true;
}
}
Layer::Handle layer_import = layer;
if (layer_import->get_param_list().count("filename") != 0)
{
String filename = layer_import->get_param("filename").get(String());
if ( !CanvasFileNaming::is_embeded(filename)
&& !layer_import->dynamic_param_list().count("filename") )
{
this->layer_import = layer_import;
return true;
}
}
return false;
}
return Action::CanvasSpecific::set_param(name,param);
}