break;
case AUTOMATION_CAMERA_Z:
case AUTOMATION_PROJECTOR_Z:
+ case AUTOMATION_SPEED:
autogrouptype = AUTOGROUPTYPE_ZOOM;
break;
case AUTOMATION_FADE:
key_free = 0;
key_mbar = 0;
key_mode_displayed = false;
+ key_edit_displayed = false;
}
KeyframePopup::~KeyframePopup()
delete key_free_t;
delete key_free;
}
+ if( !key_edit_displayed ) {
+ delete key_edit;
+ }
}
void KeyframePopup::create_objects()
add_item(key_show = new KeyframePopupShow(mwindow, this));
add_item(key_delete = new KeyframePopupDelete(mwindow, this));
add_item(key_copy = new KeyframePopupCopy(mwindow, this));
- add_item(key_edit = new KeyframePopupEdit(mwindow, this));
+ key_edit = new KeyframePopupEdit(mwindow, this);
key_mbar = new BC_MenuItem("-");
key_smooth = new KeyframePopupCurveMode(mwindow, this, FloatAuto::SMOOTH);
key_linear = new KeyframePopupCurveMode(mwindow, this, FloatAuto::LINEAR);
// determines the type of automation node. if floatauto, adds
// menu entries showing the curve mode of the node
{
+ if( !key_edit_displayed && keyframe_plugin ) {
+ add_item(key_edit);
+ key_edit_displayed = true;
+ }
+ else if( key_edit_displayed && !keyframe_plugin ) {
+ remove_item(key_mbar);
+ key_edit_displayed = false;
+ }
+
if(!key_mode_displayed && autos && autos->get_type() == AUTOMATION_TYPE_FLOAT)
{ // append additional menu entries showing the curve_mode
add_item(key_mbar);
{
mwindow->update_plugin_guis();
mwindow->show_plugin(popup->keyframe_plugin);
- } else
- if (popup->keyframe_automation)
- {
+ }
+ else if( popup->keyframe_automation ) {
/*
mwindow->cwindow->gui->lock_window();
KeyframePopupCurveMode *key_linear;
KeyframePopupCurveMode *key_free_t;
KeyframePopupCurveMode *key_free;
+ bool key_edit_displayed;
bool key_mode_displayed;
void handle_curve_mode(Autos *autos, Auto *auto_keyframe);
return render_window;
}
+void Render::handle_done_event(int result)
+{
+ if(!result) {
+ // add to recentlist only on OK
+ render_window->format_tools->path_recent->
+ add_item(File::formattostr(asset->format), asset->path);
+ }
+ render_window = 0;
+}
void Render::handle_close_event(int result)
{
const int debug = 0;
if(!result) {
- // add to recentlist only on OK
- render_window->format_tools->path_recent->
- add_item(File::formattostr(asset->format), asset->path);
// Check the asset format for errors.
FormatCheck format_check(asset);
format_error = format_check.check_format();
if(debug) printf("Render::handle_close_event %d\n", __LINE__);
}
//PRINT_TRACE
- render_window = 0;
}
void stop_operation();
BC_Window* new_gui();
+ void handle_done_event(int result);
void handle_close_event(int result);
void start_render();
double view_start, unit_start;
double view_end, unit_end, yscale;
double zoom_sample, zoom_units;
- double ax, ay, ax2, ay2, ax0, ay0;
double in_x2, in_y2, out_x2, out_y2;
double slope;
//int skip = 0;
// Get first auto before start
Auto *current = 0, *previous = 0;
- ax0 = ay0 = -1;
for( current = autos->last;
current && current->position >= unit_start;
current = PREVIOUS ) ;
- if( !current ) {
- current = autos->first ? autos->first : autos->default_auto;
- ax0 = 0;
- }
- if( current ) {
+ Auto *first_auto = current ? current :
+ autos->first ? autos->first : autos->default_auto;
+
+ double ax = 0, ay = 0, ax2 = 0, ay2 = 0;
+ if( first_auto )
calculate_auto_position(&ax, &ay, 0, 0, 0, 0,
- current, unit_start, zoom_units, yscale, autogrouptype);
- if( ax0 < 0 ) current = NEXT;
- }
- else
- ay0 = 0;
+ first_auto, unit_start, zoom_units, yscale, autogrouptype);
- if( ax0 >= 0 ) ax = ax0;
- if( ay0 >= 0 ) ay = ay0;
+ if( current )
+ current = NEXT;
+ else {
+ current = autos->first;
+ ax = 0;
+ }
do {
//skip = 0;
//skip = 1;
}
- slope = (ay2 - ay) / (ax2 - ax);
+ slope = ax2 > ax ? (ay2 - ay) / (ax2 - ax) : 0;
- if(ax2 > get_w())
- {
+ if(ax2 > get_w()) {
draw_auto = 0;
ax2 = get_w();
ay2 = ay + slope * (get_w() - ax);
}
- if(ax < 0)
- {
+ if(ax < 0) {
ay = ay + slope * (0 - ax);
ax = 0;
}