- for( int i=0; i<mask_points.size(); ++i ) {
- MaskPoint *point = mask_points.values[i];
- float px = point->x - gui->x_origin;
- float py = point->y - gui->y_origin;
- float nx = !rotate ? px*scale : px*ct + py*st;
- float ny = !rotate ? py*scale : py*ct - px*st;
- point->x = nx + gui->x_origin;
- point->y = ny + gui->y_origin;
- px = point->control_x1; py = point->control_y1;
- point->control_x1 = !rotate ? px*scale : px*ct + py*st;
- point->control_y1 = !rotate ? py*scale : py*ct - px*st;
- px = point->control_x2; py = point->control_y2;
- point->control_x2 = !rotate ? px*scale : px*ct + py*st;
- point->control_y2 = !rotate ? py*scale : py*ct - px*st;
+ MaskAuto *keyframe = gui->mask_keyframe;
+ int gang = mask_gui->gang_focus->get_value();
+ int k = mwindow->edl->session->cwindow_mask;
+ int n = gang ? keyframe->masks.size() : k+1;
+ for( int j=gang? 0 : k; j<n; ++j ) {
+ SubMask *sub_mask = keyframe->get_submask(j);
+ ArrayList<MaskPoint*> &points = sub_mask->points;
+ if( !sub_mask ) continue;
+ for( int i=0; i<points.size(); ++i ) {
+ MaskPoint *point = points[i];
+ float px = point->x - gui->x_origin;
+ float py = point->y - gui->y_origin;
+ float nx = !rotate ? px*scale : px*ct + py*st;
+ float ny = !rotate ? py*scale : py*ct - px*st;
+ point->x = nx + gui->x_origin;
+ point->y = ny + gui->y_origin;
+ px = point->control_x1; py = point->control_y1;
+ point->control_x1 = !rotate ? px*scale : px*ct + py*st;
+ point->control_y1 = !rotate ? py*scale : py*ct - px*st;
+ px = point->control_x2; py = point->control_y2;
+ point->control_x2 = !rotate ? px*scale : px*ct + py*st;
+ point->control_y2 = !rotate ? py*scale : py*ct - px*st;
+ }