#else
keyframe->feather = v;
#endif
-
gui->update_preview();
}
((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 1);
if (keyframe) {
- keyframe->apply_before_plugins = get_value();
+ int v = get_value();
+#ifdef USE_KEYFRAME_SPANNING
+ MaskAuto temp_keyframe(gui->mwindow->edl, autos);
+ temp_keyframe.copy_data(keyframe);
+ temp_keyframe.apply_before_plugins = v;
+ autos->update_parameter(&temp_keyframe);
+#else
+ keyframe->apply_before_plugins = v;
+#endif
gui->update_preview();
}
return 1;
MaskPoint *point;
((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 1);
- if (keyframe) {
- keyframe->disable_opengl_masking = get_value();
+ if( keyframe ) {
+ int v = get_value();
+#ifdef USE_KEYFRAME_SPANNING
+ MaskAuto temp_keyframe(gui->mwindow->edl, autos);
+ temp_keyframe.copy_data(keyframe);
+ temp_keyframe.disable_opengl_masking = v;
+ autos->update_parameter(&temp_keyframe);
+#else
+ keyframe->disable_opengl_masking = v;
+#endif
gui->update_preview();
}
return 1;
void MaskAuto::update_parameter(MaskAuto *ref, MaskAuto *src)
{
if(src->value != ref->value)
- {
this->value = src->value;
- }
-
if(src->mode != ref->mode)
- {
this->mode = src->mode;
- }
-
+ if(src->apply_before_plugins != ref->apply_before_plugins)
+ this->apply_before_plugins = src->apply_before_plugins;
+ if(src->disable_opengl_masking != ref->disable_opengl_masking)
+ this->disable_opengl_masking = src->disable_opengl_masking;
if(!EQUIV(src->feather, ref->feather))
- {
this->feather = src->feather;
- }
- for(int i = 0; i < masks.size(); i++)
- {
+ for( int i=0; i<masks.size(); ++i ) {
if(!src->get_submask(i)->equivalent(*ref->get_submask(i)))
this->get_submask(i)->copy_from(*src->get_submask(i));
}
{
EDL *edl = gui->vwindow->get_edl();
- if(!get_canvas()->get_video_on()) get_canvas()->clear_box(0, 0, get_canvas()->get_w(), get_canvas()->get_h());
- if(!get_canvas()->get_video_on() && refresh_frame && edl)
- {
- float in_x1, in_y1, in_x2, in_y2;
- float out_x1, out_y1, out_x2, out_y2;
- get_transfers(edl,
- in_x1, in_y1, in_x2, in_y2,
- out_x1, out_y1, out_x2, out_y2);
+ if( !get_canvas()->get_video_on() ) {
+ int cw = get_canvas()->get_w(), ch = get_canvas()->get_h();
+ get_canvas()->clear_box(0, 0, cw, ch);
+ int ow = get_output_w(edl), oh = get_output_h(edl);
+ if( ow > 0 && oh > 0 && refresh_frame && edl ) {
+ float in_x1, in_y1, in_x2, in_y2;
+ float out_x1, out_y1, out_x2, out_y2;
+ get_transfers(edl,
+ in_x1, in_y1, in_x2, in_y2,
+ out_x1, out_y1, out_x2, out_y2);
// input scaled from session to refresh frame coordinates
- int ow = get_output_w(edl);
- int oh = get_output_h(edl);
- int rw = refresh_frame->get_w();
- int rh = refresh_frame->get_h();
- float xs = (float)rw / ow;
- float ys = (float)rh / oh;
- in_x1 *= xs; in_x2 *= xs;
- in_y1 *= ys; in_y2 *= ys;
- get_canvas()->draw_vframe(refresh_frame,
- (int)out_x1,
- (int)out_y1,
- (int)(out_x2 - out_x1),
- (int)(out_y2 - out_y1),
- (int)in_x1,
- (int)in_y1,
- (int)(in_x2 - in_x1),
- (int)(in_y2 - in_y1),
+ int rw = refresh_frame->get_w();
+ int rh = refresh_frame->get_h();
+ float xs = (float)rw / ow;
+ float ys = (float)rh / oh;
+ in_x1 *= xs; in_x2 *= xs;
+ in_y1 *= ys; in_y2 *= ys;
+ get_canvas()->draw_vframe(refresh_frame,
+ (int)out_x1, (int)out_y1,
+ (int)(out_x2 - out_x1), (int)(out_y2 - out_y1),
+ (int)in_x1, (int)in_y1,
+ (int)(in_x2 - in_x1), (int)(in_y2 - in_y1),
0);
- }
-
- if(!get_canvas()->get_video_on())
- {
+ }
draw_overlays();
get_canvas()->flash(flush);
}