#define INCLUDE_LAYER(class) synfig::Layer::book()[synfig::String(class::name__)]=BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__)
#define LAYER_ALIAS(class,alias) synfig::Layer::book()[synfig::String(alias)]=synfig::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__);
- INCLUDE_LAYER(Layer_SolidColor);
- INCLUDE_LAYER(Layer_PasteCanvas);
- INCLUDE_LAYER(Layer_Polygon);
- LAYER_ALIAS(Layer_Polygon,"Polygon");
- INCLUDE_LAYER(Layer_MotionBlur);
+ INCLUDE_LAYER(Layer_SolidColor); LAYER_ALIAS(Layer_SolidColor,"SolidColor");
+ INCLUDE_LAYER(Layer_PasteCanvas); LAYER_ALIAS(Layer_PasteCanvas,"PasteCanvas");
+ INCLUDE_LAYER(Layer_Polygon); LAYER_ALIAS(Layer_Polygon,"Polygon");
+ INCLUDE_LAYER(Layer_MotionBlur); LAYER_ALIAS(Layer_MotionBlur,"MotionBlur");
#undef INCLUDE_LAYER
bool
Layer::set_param(const String ¶m, const ValueBase &value)
{
- if(param=="z_depth" && value.same_as(z_depth_))
+ if(param=="z_depth" && value.same_type_as(z_depth_))
{
z_depth_=value.get(z_depth_);
return true;
// This parameter is a canvas. We need a close look.
Canvas::Handle canvas(iter->second.get(Canvas::Handle()));
- if(canvas->is_inline())
+ if(canvas && canvas->is_inline())
{
// This parameter is an inlinecanvas! we need to clone it
// before we set it as aparameter.