Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 140984
Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +11 lines)
Line  Link Here
0
-- a/source/blender/src/buttons_scene.c
0
++ b/source/blender/src/buttons_scene.c
Lines 473-479 static void ftype_pic(char *name) Link Here
473
	allqueue(REDRAWBUTSSCENE, 0);
473
	allqueue(REDRAWBUTSSCENE, 0);
474
}
474
}
475
475
476
static void run_playanim(char *file) 
476
static void run_playanim(char *file, char *file_end) 
477
{
477
{
478
	extern char bprogname[];	/* usiblender.c */
478
	extern char bprogname[];	/* usiblender.c */
479
	char str[FILE_MAXDIR+FILE_MAXFILE];
479
	char str[FILE_MAXDIR+FILE_MAXFILE];
Lines 483-495 static void run_playanim(char *file) Link Here
483
	calc_renderwin_rectangle((G.scene->r.xsch*G.scene->r.size)/100, 
483
	calc_renderwin_rectangle((G.scene->r.xsch*G.scene->r.size)/100, 
484
							 (G.scene->r.ysch*G.scene->r.size)/100, G.winpos, pos, size);
484
							 (G.scene->r.ysch*G.scene->r.size)/100, G.winpos, pos, size);
485
485
486
	sprintf(str, "%s -a -p %d %d \"%s\"", bprogname, pos[0], pos[1], file);
486
	sprintf(str, "%s -a -p %d %d -e \"%s\" \"%s\"", bprogname, pos[0], pos[1], file_end, file);
487
	system(str);
487
	system(str);
488
}
488
}
489
489
490
void playback_anim(void)
490
void playback_anim(void)
491
{	
491
{	
492
	char file[FILE_MAXDIR+FILE_MAXFILE];
492
	char file[FILE_MAXDIR+FILE_MAXFILE];
493
	char file_end[FILE_MAXDIR+FILE_MAXFILE];
493
494
494
	if(BKE_imtype_is_movie(G.scene->r.imtype)) {
495
	if(BKE_imtype_is_movie(G.scene->r.imtype)) {
495
		switch (G.scene->r.imtype) {
496
		switch (G.scene->r.imtype) {
Lines 508-523 #endif Link Here
508
			break;
509
			break;
509
		}
510
		}
510
		if(BLI_exist(file)) {
511
		if(BLI_exist(file)) {
511
			run_playanim(file);
512
			run_playanim(file, "stfu");
512
		}
513
		}
513
		else error("Can't find movie: %s", file);
514
		else error("Can't find movie: %s", file);
514
	}
515
	}
515
	else {
516
	else {
516
		BKE_makepicstring(file, G.scene->r.sfra);
517
		BKE_makepicstring(file, G.scene->r.sfra);
517
		if(BLI_exist(file)) {
518
		BKE_makepicstring(file_end, G.scene->r.efra);
518
			run_playanim(file);
519
		if(!BLI_exist(file))
519
		}
520
			error("Can't find image: %s", file);
520
		else error("Can't find image: %s", file);
521
		if(!BLI_exist(file_end))
522
			error("Can't find image: %s", file_end);
523
		run_playanim(file, file_end);
521
	}
524
	}
522
}
525
}
523
526
(-)a/source/blender/src/playanim.c (-5 / +13 lines)
Lines 212-218 static void toscreen(Pict *picture, stru Link Here
212
	window_swap_buffers(g_window);
212
	window_swap_buffers(g_window);
213
}
213
}
214
214
215
static void build_pict_list(char * first)
215
static void build_pict_list(char * first, char * last)
216
{
216
{
217
	int size,pic,file;
217
	int size,pic,file;
218
	char *mem, name[256];
218
	char *mem, name[256];
Lines 261-267 static void build_pict_list(char * first Link Here
261
            O_DIRECT is a Silicon Graphics extension and is only supported on
261
            O_DIRECT is a Silicon Graphics extension and is only supported on
262
            local EFS and XFS file systems.
262
            local EFS and XFS file systems.
263
*/
263
*/
264
		while(IMB_ispic(name)){
264
		while(IMB_ispic(name) && strcmp(name, last) != 0){
265
			file = open(name, O_BINARY|O_RDONLY, 0);
265
			file = open(name, O_BINARY|O_RDONLY, 0);
266
			if (file < 0) return;
266
			if (file < 0) return;
267
			picture = (struct pict*)MEM_callocN(sizeof(struct pict), "picture");
267
			picture = (struct pict*)MEM_callocN(sizeof(struct pict), "picture");
Lines 329-335 void playanim(int argc, char **argv) Link Here
329
{
329
{
330
	struct ImBuf *ibuf = 0;
330
	struct ImBuf *ibuf = 0;
331
	struct pict *picture = 0;
331
	struct pict *picture = 0;
332
	char name[256];
332
	char name[256], name_last[256];
333
	short val = 0, go = TRUE, ibufx = 0, ibufy = 0;
333
	short val = 0, go = TRUE, ibufx = 0, ibufy = 0;
334
	int event, stopped = FALSE, maxwinx, maxwiny;
334
	int event, stopped = FALSE, maxwinx, maxwiny;
335
	short /*  c233 = FALSE, */ /*  yuvx = FALSE, */ once = FALSE, sstep = FALSE, wait2 = FALSE, /*  resetmap = FALSE, */ pause = 0;
335
	short /*  c233 = FALSE, */ /*  yuvx = FALSE, */ once = FALSE, sstep = FALSE, wait2 = FALSE, /*  resetmap = FALSE, */ pause = 0;
Lines 355-360 void playanim(int argc, char **argv) Link Here
355
						printf("too few arguments for -p (need 2): skipping\n");
355
						printf("too few arguments for -p (need 2): skipping\n");
356
					}
356
					}
357
					break;
357
					break;
358
				case 'e':
359
					if (argc > 2) {
360
						strncpy(name_last, argv[2], sizeof(name_last) - 1);
361
						argc--;
362
						argv++;
363
					} else
364
						printf("too few arguments for -e (need 1): skipping\n");
365
					break;
358
				default:
366
				default:
359
					printf("unknown option '%c': skipping\n", argv[1][1]);
367
					printf("unknown option '%c': skipping\n", argv[1][1]);
360
					break;
368
					break;
Lines 439-449 #endif /* WITH_QUICKTIME */ Link Here
439
	
447
	
440
	window_swap_buffers(g_window);
448
	window_swap_buffers(g_window);
441
	
449
	
442
	build_pict_list(name);
450
	build_pict_list(name, name_last);
443
	
451
	
444
	for (i = 2; i < argc; i++){
452
	for (i = 2; i < argc; i++){
445
		strcpy(name, argv[i]);
453
		strcpy(name, argv[i]);
446
		build_pict_list(name);
454
		build_pict_list(name, name_last);
447
	}
455
	}
448
456
449
	IMB_freeImBuf(ibuf); 
457
	IMB_freeImBuf(ibuf); 

Return to bug 140984