{
int cur_x, cur_y;
popup->gui->get_abs_cursor(cur_x, cur_y);
- if( mwindow->session->drag_assets->size() ) {
- AssetEdit *asset_edit = mwindow->awindow->get_asset_editor();
- asset_edit->edit_asset(
- mwindow->session->drag_assets->values[0], cur_x, cur_y);
+ int n = mwindow->session->drag_assets->size();
+ if( n > 0 ) {
+ for( int i=0; i<n; ++i ) {
+ AssetEdit *asset_edit = mwindow->awindow->get_asset_editor();
+ asset_edit->edit_asset(
+ mwindow->session->drag_assets->values[i], cur_x-30*i, cur_y-30*i);
+ }
}
else if( mwindow->session->drag_clips->size() ) {
popup->gui->awindow->clip_edit->edit_clip(
int AssetPopupView::handle_event()
{
VWindow *vwindow = mwindow->get_viewer(1, DEFAULT_VWINDOW);
- vwindow->gui->lock_window("AssetPopupView::handle_event");
if( mwindow->session->drag_assets->total )
vwindow->change_source(
vwindow->change_source(
mwindow->session->drag_clips->values[0]);
- vwindow->gui->unlock_window();
return 1;
}
VWindow *vwindow = mwindow->get_viewer(1);
// TODO: create new vwindow or change current vwindow
- vwindow->gui->lock_window("AssetPopupView::handle_event");
-
if( mwindow->session->drag_assets->total )
vwindow->change_source(
mwindow->session->drag_assets->values[0]);
vwindow->change_source(
mwindow->session->drag_clips->values[0]);
- vwindow->gui->unlock_window();
return 1;
}
double position = edl->local_session->get_selectionstart(1);
int64_t source_position = (int64_t)(position * edl->get_frame_rate());
- ret = render_engine.vrender->process_buffer(frame, source_position, 0);
+ ret = !render_engine.vrender ? 1 :
+ render_engine.vrender->process_buffer(frame, source_position, 0);
if( !ret )
ret = file.write_video_buffer(1);
file.close_file();
int cw = lx1-lx0, ch = ly1-ly0;
hide_window();
sync_display();
+ grab_thread->done = 1;
MWindow *mwindow = grab_thread->mwindow;
Preferences *preferences = mwindow->preferences;
asset->format = FILE_PPM;
break;
}
+
// no odd dimensions
int rw = get_root_w(0), rh = get_root_h(0);
if( cx < 0 ) { cw += cx; cx = 0; }
if( cy < 0 ) { ch += cy; cy = 0; }
if( cx+cw > rw ) cw = rw-cx;
if( cy+ch > rh ) ch = rh-cy;
+ if( !cw || !ch ) return 1;
+
VFrame vframe(cw,ch, BC_RGB888);
if( cx+cw < rw ) ++cw;
if( cy+ch < rh ) ++ch;
asset->remove_user();
}
- grab_thread->done = 1;
return 1;
}