X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fduckmatic.cpp;h=8475e06c19cf760c31acb1d7b0a14a88124120e4;hb=6058f1f8af684257c314a78cc0a24ced57bf3168;hp=2db91b8a370518d5bf0e41edf0a4981ceac1867a;hpb=3163c8bde2f1c7599b71eb22373217edefaac07f;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp index 2db91b8..8475e06 100644 --- a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp +++ b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp @@ -768,6 +768,8 @@ Duckmatic::find_duck(synfig::Point point, synfig::Real radius, Duck::Type type) { const Duck::Handle& duck(iter->second); + if(duck->get_ignore()) + continue; Real dist((duck->get_trans_point()-point).mag_squared()); if(duck->get_type()&Duck::TYPE_VERTEX) @@ -1514,8 +1516,9 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handleget_hint().empty()) + // Add the width duck if it is a parameter with a hint (ie. "width") or if it isn't a parameter + if ((param_desc && !param_desc->get_hint().empty()) || + !param_desc) { etl::handle width; if(add_to_ducks(synfigapp::ValueDesc(vertex_value_node,1),canvas_view,transform_stack,REAL_COOKIE)) @@ -1524,11 +1527,20 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handleset_origin(duck); width->set_type(Duck::TYPE_WIDTH); width->set_name(guid_string(synfigapp::ValueDesc(value_node,i))+".w"); + + // if the bline is a layer's parameter, scale the width duck by the layer's "width" parameter + if (param_desc) { ValueBase value(synfigapp::ValueDesc(value_desc.get_layer(),param_desc->get_hint()).get_value(get_time())); if(value.same_type_as(synfig::Real())) width->set_scalar(value.get(synfig::Real())*0.5f); + // if it doesn't have a "width" parameter, scale by 0.5f instead + else + width->set_scalar(0.5f); } + // otherwise just present the raw unscaled width + else + width->set_scalar(0.5f); } else synfig::error("Unable to add width duck!");