Smach::event_result
StateBLine_Context::event_stop_handler(const Smach::event& /*x*/)
{
- synfig::info("STATE RotoBLine: Received Stop Event");
+// synfig::info("STATE RotoBLine: Received Stop Event");
// run();
reset();
// throw Smach::egress_exception();
Smach::event_result
StateBLine_Context::event_refresh_handler(const Smach::event& /*x*/)
{
- synfig::info("STATE RotoBLine: Received Refresh Event");
+// synfig::info("STATE RotoBLine: Received Refresh Event");
refresh_ducks();
return Smach::RESULT_ACCEPT;
}
synfigapp::SelectionManager::LayerList layer_selection;
+ // count how many layers we're going to be creating
+ int layers_to_create = this->layers_to_create();
+
///////////////////////////////////////////////////////////////////////////
// C U R V E G R A D I E N T
///////////////////////////////////////////////////////////////////////////
}
}
- if (get_layer_link_offsets_flag())
+ // only link the curve gradient's offset parameter if the option is selected and we're creating more than one layer
+ if (get_layer_link_offsets_flag() && layers_to_create > 1)
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
assert(action);
}
}
- // plants don't have offsets?
- if (get_layer_link_offsets_flag())
+ // only link the plant's offset parameter if the option is selected and we're creating more than one layer
+ if (get_layer_link_offsets_flag() && layers_to_create > 1)
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
assert(action);
}
}
- if (get_layer_link_offsets_flag())
+ // only link the region's offset parameter if the option is selected and we're creating more than one layer
+ if (get_layer_link_offsets_flag() && layers_to_create > 1)
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
assert(action);
}
}
- if (get_layer_link_offsets_flag())
+ // only link the outline's offset parameter if the option is selected and we're creating more than one layer
+ if (get_layer_link_offsets_flag() && layers_to_create > 1)
{
synfigapp::Action::Handle action(synfigapp::Action::create("layer_param_connect"));
assert(action);
duck->signal_user_click(2).connect(
sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::popup_vertex_menu),value_node)
);
- duck->set_guid(value_node->get_guid()^GUID::hasher(0));
+ duck->set_guid(value_node->get_guid()^synfig::GUID::hasher(0));
get_work_area()->add_duck(duck);
tduck->set_origin(duck);
tduck->set_scalar(-0.33333333333333333);
tduck->set_tangent(true);
- tduck->set_guid(value_node->get_guid()^GUID::hasher(3));
+ tduck->set_guid(value_node->get_guid()^synfig::GUID::hasher(3));
tduck->signal_edited().connect(
sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::on_tangent1_change),value_node)
);
sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::on_tangent1_change),value_node)
);
}
- tduck->set_guid(value_node->get_guid()^GUID::hasher(4));
+ tduck->set_guid(value_node->get_guid()^synfig::GUID::hasher(4));
tduck->signal_user_click(2).connect(
sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::popup_handle_menu),value_node)
);
//get_work_area()->add_duck(bezier->c2);
get_work_area()->add_bezier(bezier);
- duck->set_guid(GUID());
- tduck->set_guid(GUID());
+ duck->set_guid(synfig::GUID());
+ tduck->set_guid(synfig::GUID());
next_duck=duck;
}
bline_point.set_vertex(curve(origin));
bline_point.set_width((next_bline_point.get_width()-prev_bline_point.get_width())*origin+prev_bline_point.get_width());
-#ifdef ETL_FIXED_DERIVATIVE
bline_point.set_tangent1(deriv(origin)*std::min(1.0f-origin,origin));
-#else
- bline_point.set_tangent1(-deriv(origin)*std::min(1.0f-origin,origin));
-#endif
bline_point.set_tangent2(bline_point.get_tangent1());
bline_point.set_split_tangent_flag(false);
bline_point.set_origin(origin);