X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer_composite.cpp;h=b7880112b75d2ecf6d06132de2ced00d4291ad69;hb=34d470416675482ca866146fd6b3201a19f8e4e6;hp=7381017d1c8bbff65af557c63f80243a16180784;hpb=0d270efd0dd73dad0077a76ab0b5408510ab1151;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer_composite.cpp b/synfig-core/trunk/src/synfig/layer_composite.cpp index 7381017..b788011 100644 --- a/synfig-core/trunk/src/synfig/layer_composite.cpp +++ b/synfig-core/trunk/src/synfig/layer_composite.cpp @@ -155,16 +155,30 @@ Layer_Composite::set_param(const String & param, const ValueBase &value) else if(param=="blend_method" && value.same_type_as(int())) { - Color::BlendMethod blend_method = static_cast(value.get(int())); + blend_method_ = static_cast(value.get(int())); - if (blend_method < 0 || blend_method >= Color::BLEND_END) + if (blend_method_ < 0 || blend_method_ >= Color::BLEND_END) { - warning("illegal value (%d) for blend_method - using Composite instead", blend_method); + warning("illegal value (%d) for blend_method - using Composite instead", blend_method_); blend_method_ = Color::BLEND_COMPOSITE; return false; } - blend_method_ = blend_method; + if (blend_method_ == Color::BLEND_STRAIGHT) + { + Canvas::Handle canvas(get_canvas()); + if (canvas) + { + String version(canvas->get_version()); + + if (version == "0.1" || version == "0.2") + if (get_name() == "PasteCanvas") + warning("loaded a version %s canvas with a 'Straight' blended PasteCanvas (%s) - check it renders OK", + version.c_str(), get_non_empty_description().c_str()); + else + blend_method_ = Color::BLEND_COMPOSITE; + } + } } else return Layer::set_param(param,value);