**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007, 2008 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
#ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Canvas::Handle op_canvas(Canvas::create());
- optimize_layers(canvas->get_context(), op_canvas);
+ op_canvas->set_file_name(canvas->get_file_name());
+ optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas);
context=op_canvas->get_context();
#else
context=canvas->get_context();
#ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Context context;
Canvas::Handle op_canvas(Canvas::create());
+ op_canvas->set_file_name(canvas->get_file_name());
// Set the time that we wish to render
canvas->set_time(t);
- optimize_layers(canvas->get_context(), op_canvas);
+ optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas);
context=op_canvas->get_context();
#else
Context context;
#ifdef SYNFIG_OPTIMIZE_LAYER_TREE
Canvas::Handle op_canvas(Canvas::create());
- optimize_layers(canvas->get_context(), op_canvas);
+ op_canvas->set_file_name(canvas->get_file_name());
+ optimize_layers(canvas->get_time(), canvas->get_context(), op_canvas);
context=op_canvas->get_context();
#else
context=canvas->get_context();