// Apply some defaults
if(layer->set_param("fg",synfigapp::Main::get_foreground_color()))
layer->set_param("bg",synfigapp::Main::get_background_color());
+ else if (name == "SolidColor")
+ layer->set_param("color",synfigapp::Main::get_background_color());
else
layer->set_param("color",synfigapp::Main::get_foreground_color());
// Action to move the layer (if necessary)
if(depth>0)
{
- Action::Handle action(Action::create("layer_move"));
+ Action::Handle action(Action::create("LayerMove"));
assert(action);
if(!action)
void
CanvasInterface::set_rend_desc(const synfig::RendDesc &rend_desc)
{
- Action::Handle action(Action::create("canvas_rend_desc_set"));
+ Action::Handle action(Action::create("CanvasRendDescSet"));
assert(action);
if(!action)
void
CanvasInterface::set_name(const synfig::String &x)
{
- Action::Handle action(Action::create("canvas_name_set"));
+ Action::Handle action(Action::create("CanvasNameSet"));
assert(action);
if(!action)
void
CanvasInterface::set_description(const synfig::String &x)
{
- Action::Handle action(Action::create("canvas_description_set"));
+ Action::Handle action(Action::create("CanvasDescriptionSet"));
assert(action);
if(!action)
void
CanvasInterface::set_id(const synfig::String &x)
{
- Action::Handle action(Action::create("canvas_id_set"));
+ Action::Handle action(Action::create("CanvasIdSet"));
assert(action);
if(!action)
}
bool
-CanvasInterface::import(const synfig::String &filename, bool resize_image)
+CanvasInterface::import(const synfig::String &filename, synfig::String &errors, synfig::String &warnings, bool resize_image)
{
Action::PassiveGrouper group(get_instance().get(),_("Import Image"));
// If this is a SIF file, then we need to do things slightly differently
if(ext=="sif" || ext=="sifz")try
{
- String errors, warnings;
Canvas::Handle outside_canvas(synfig::open_canvas(filename, errors, warnings));
if(!outside_canvas)
throw String(_("Unable to open this composition")) + ":\n\n" + errors;
throw String(_("Unable to create \"Paste Canvas\" layer"));
if(!layer->set_param("canvas",ValueBase(outside_canvas)))
throw int();
+ get_canvas()->register_external_canvas(filename, outside_canvas);
//layer->set_description(basename(filename));
signal_layer_new_description()(layer,filename);
void
CanvasInterface::waypoint_duplicate(ValueNode::Handle value_node,synfig::Waypoint waypoint)
{
- Action::Handle action(Action::create("waypoint_set_smart"));
+ Action::Handle action(Action::create("WaypointSetSmart"));
assert(action);
if(!action)
void
CanvasInterface::waypoint_remove(ValueNode::Handle value_node,synfig::Waypoint waypoint)
{
- Action::Handle action(Action::create("waypoint_remove"));
+ Action::Handle action(Action::create("WaypointRemove"));
assert(action);
if(!action)
if(value_node->is_exported())
return;
- Action::Handle action(Action::create("value_node_add"));
+ Action::Handle action(Action::create("ValueNodeAdd"));
assert(action);
if(!action)
if(value_desc.is_exported())
return;
- Action::Handle action(Action::create("value_desc_export"));
+ Action::Handle action(Action::create("ValueDescExport"));
assert(action);
if(!action)
{ synfig::warning("Can't get canvas from value desc...?"); }
#endif
- synfigapp::Action::Handle action(synfigapp::Action::create("value_desc_set"));
+ synfigapp::Action::Handle action(synfigapp::Action::create("ValueDescSet"));
if(!action)
{
return false;