[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13310] trunk/blender/source/blender: Made it so locked strips inside metastrips are transformed.

Campbell Barton ideasman42 at gmail.com
Sun Jan 20 18:53:59 CET 2008


Revision: 13310
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13310
Author:   campbellbarton
Date:     2008-01-20 18:53:58 +0100 (Sun, 20 Jan 2008)

Log Message:
-----------
Made it so locked strips inside metastrips are transformed.

Removed FTYPE from render output panel - was some old format that did index colors, and wasn't even used anywhere.

Added 2 options to the render output panel that can be used for a really basic local renderfarm (even artists can use it!),
"NoOverwrite" and "Touch"
When both are enabled, rendering 1 scene between many pc's on a fast network will populate the directory with frames.
Also useful to delete frames that have errors and re-render (without manually re-rendering each frame)

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/blender.c
    trunk/blender/source/blender/blenkernel/intern/scene.c
    trunk/blender/source/blender/include/butspace.h
    trunk/blender/source/blender/makesdna/DNA_scene_types.h
    trunk/blender/source/blender/python/api2_2x/sceneRender.c
    trunk/blender/source/blender/render/intern/source/pipeline.c
    trunk/blender/source/blender/src/buttons_scene.c
    trunk/blender/source/blender/src/editseq.c

Modified: trunk/blender/source/blender/blenkernel/intern/blender.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/blender.c	2008-01-20 14:50:30 UTC (rev 13309)
+++ trunk/blender/source/blender/blenkernel/intern/blender.c	2008-01-20 17:53:58 UTC (rev 13310)
@@ -307,7 +307,6 @@
 		}
 		BLI_clean(scene->r.backbuf);
 		BLI_clean(scene->r.pic);
-		BLI_clean(scene->r.ftype);
 		
 		scene= scene->id.next;
 	}

Modified: trunk/blender/source/blender/blenkernel/intern/scene.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/scene.c	2008-01-20 14:50:30 UTC (rev 13309)
+++ trunk/blender/source/blender/blenkernel/intern/scene.c	2008-01-20 17:53:58 UTC (rev 13310)
@@ -257,7 +257,6 @@
 
 	strcpy(sce->r.backbuf, "//backbuf");
 	strcpy(sce->r.pic, U.renderdir);
-	strcpy(sce->r.ftype, "//ftype");
 
 	BLI_init_rctf(&sce->r.safety, 0.1f, 0.9f, 0.1f, 0.9f);
 	sce->r.osa= 8;

Modified: trunk/blender/source/blender/include/butspace.h
===================================================================
--- trunk/blender/source/blender/include/butspace.h	2008-01-20 14:50:30 UTC (rev 13309)
+++ trunk/blender/source/blender/include/butspace.h	2008-01-20 17:53:58 UTC (rev 13310)
@@ -308,7 +308,7 @@
 #define B_FS_PIC		1601
 #define B_FS_BACKBUF	1602
 
-#define B_FS_FTYPE		1604
+#define B_FS_FTYPE		1604 /* FTYPE is no more */
 #define B_DORENDER		1605
 #define B_DOANIM		1606
 #define B_PLAYANIM		1607
@@ -325,7 +325,7 @@
 #define B_PR_PANO		1619
 #define B_PR_NTSC		1620
 
-#define B_IS_FTYPE		1622
+#define B_IS_FTYPE		1622 /* FTYPE is nomore */
 #define B_IS_BACKBUF		1623
 #define B_PR_PC			1624
 

Modified: trunk/blender/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_scene_types.h	2008-01-20 14:50:30 UTC (rev 13309)
+++ trunk/blender/source/blender/makesdna/DNA_scene_types.h	2008-01-20 17:53:58 UTC (rev 13310)
@@ -281,7 +281,7 @@
 	float YF_gamma, YF_exposure, YF_raybias, YF_AApixelsize, YF_AAthreshold;
 
 	/* paths to backbufffer, output, ftype */
-	char backbuf[160], pic[160], ftype[160];
+	char backbuf[160], pic[160];
 
 	/* stamps flags. */
 	int stamp;
@@ -551,7 +551,10 @@
 #define R_THREADS		0x80000
 #define R_SPEED			0x100000
 #define R_SSS			0x200000
+#define R_NO_OVERWRITE	0x400000 /* skip existing files */
+#define R_TOUCH			0x800000 /* touch files before rendering */
 
+
 /* filtertype */
 #define R_FILTER_BOX	0
 #define R_FILTER_TENT	1
@@ -610,7 +613,7 @@
 #define R_TARGA		0
 #define R_IRIS		1
 #define R_HAMX		2
-#define R_FTYPE		3
+#define R_FTYPE		3 /* ftype is nomore */
 #define R_JPEG90	4
 #define R_MOVIE		5
 #define R_IRIZ		7

Modified: trunk/blender/source/blender/python/api2_2x/sceneRender.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/sceneRender.c	2008-01-20 14:50:30 UTC (rev 13309)
+++ trunk/blender/source/blender/python/api2_2x/sceneRender.c	2008-01-20 17:53:58 UTC (rev 13310)
@@ -116,8 +116,6 @@
 		PyObject *args );
 static PyObject *RenderData_SetBackbufPath( BPy_RenderData *self,
 		PyObject *args );
-static PyObject *RenderData_SetFtypePath( BPy_RenderData *self,
-		PyObject *args );
 static PyObject *RenderData_SetOversamplingLevel( BPy_RenderData * self,
 		PyObject * args );
 static PyObject *RenderData_SetRenderWinSize( BPy_RenderData * self,
@@ -982,7 +980,6 @@
 	case R_HAMX :
 	case R_IRIS :
 	case R_IRIZ :
-	case R_FTYPE :
 	case R_TIFF :
 	case R_CINEON :
 	case R_DPX :
@@ -2220,29 +2217,6 @@
 	return 0;
 }
 
-PyObject *RenderData_getFtypePath( BPy_RenderData * self )
-{
-	return PyString_FromString( self->renderContext->ftype );
-}
-
-static int RenderData_setFtypePath( BPy_RenderData *self, PyObject *value )
-{
-	char *name;
-
-	name = PyString_AsString( value );
-	if( !name )
-		return EXPP_ReturnIntError( PyExc_TypeError, "expected a string" );
-
-	if( strlen( name ) >= sizeof(self->renderContext->ftype) )
-		return EXPP_ReturnIntError( PyExc_ValueError,
-				"ftype path is too long" );
-
-	strcpy( self->renderContext->ftype, name );
-	EXPP_allqueue( REDRAWBUTSSCENE, 0 );
-
-	return 0;
-}
-
 PyObject *RenderData_getRenderWinSize( BPy_RenderData * self )
 {
 	return PyInt_FromLong( (long) self->renderContext->size );
@@ -2507,10 +2481,6 @@
 	 (getter)RenderData_getBackbufPath, (setter)RenderData_setBackbufPath,
 	 "Path to a background image (setting loads image)",
 	 NULL},
-	{"ftypePath",
-	 (getter)RenderData_getFtypePath, (setter)RenderData_setFtypePath,
-	 "The path to Ftype file",
-	 NULL},
 	{"edgeColor",
 	 (getter)RenderData_getEdgeColor, (setter)RenderData_setEdgeColor,
 	 "RGB color triplet for edges in Toon shading",
@@ -2730,10 +2700,6 @@
 	{"enableBackbuf", ( PyCFunction ) RenderData_EnableBackbuf,
 	 METH_VARARGS,
 	 "(bool) - enable/disable the backbuf image"},
-	{"setFtypePath", ( PyCFunction ) RenderData_SetFtypePath, METH_VARARGS,
-	 "(string) - get/set the path to output the Ftype file"},
-	{"getFtypePath", ( PyCFunction ) RenderData_getFtypePath, METH_NOARGS,
-	 "() - get the path to Ftype file"},
 	{"enableExtensions", ( PyCFunction ) RenderData_EnableExtensions,
 	 METH_VARARGS,
 	 "(bool) - enable/disable windows extensions for output files"},
@@ -3140,7 +3106,6 @@
 	PyModule_AddIntConstant( submodule, "HAMX", R_HAMX );
 	PyModule_AddIntConstant( submodule, "IRIS", R_IRIS );
 	PyModule_AddIntConstant( submodule, "IRISZ", R_IRIZ );
-	PyModule_AddIntConstant( submodule, "FTYPE", R_FTYPE );
 	PyModule_AddIntConstant( submodule, "PAL", B_PR_PAL );
 	PyModule_AddIntConstant( submodule, "NTSC", B_PR_NTSC );
 	PyModule_AddIntConstant( submodule, "DEFAULT", B_PR_PRESET );
@@ -3204,13 +3169,6 @@
 			(setter)RenderData_setBackbufPath );
 }
 
-static PyObject *RenderData_SetFtypePath( BPy_RenderData *self,
-		PyObject *args )
-{
-	return EXPP_setterWrapperTuple( (void *)self, args,
-			(setter)RenderData_setFtypePath );
-}
-
 static PyObject *RenderData_SetOversamplingLevel( BPy_RenderData * self,
 		PyObject * args )
 {

Modified: trunk/blender/source/blender/render/intern/source/pipeline.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/pipeline.c	2008-01-20 14:50:30 UTC (rev 13309)
+++ trunk/blender/source/blender/render/intern/source/pipeline.c	2008-01-20 17:53:58 UTC (rev 13310)
@@ -2347,12 +2347,24 @@
 			}
 		}
 	} else {
-		for(scene->r.cfra= sfra; 
-		    scene->r.cfra<=efra; scene->r.cfra++) {
+		for(scene->r.cfra= sfra; scene->r.cfra<=efra; scene->r.cfra++) {
+			char name[FILE_MAX];
+			if (scene->r.mode & (R_NO_OVERWRITE | R_TOUCH) ) {
+				BKE_makepicstring(name, scene->r.pic, scene->r.cfra, scene->r.imtype);
+			}
+			
+			if (scene->r.mode & R_NO_OVERWRITE && BLI_exist(name)) {
+				printf("skipping existing frame \"%s\"\n", name);
+				continue;
+			}
+			if (scene->r.mode & R_TOUCH && !BLI_exist(name)) {
+				BLI_touch(name);
+			}
+
 			re->r.cfra= scene->r.cfra;	   /* weak.... */
-		
+			
 			do_render_all_options(re);
-
+			
 			if(re->test_break() == 0) {
 				do_write_image_or_movie(re, scene, mh);
 			}

Modified: trunk/blender/source/blender/src/buttons_scene.c
===================================================================
--- trunk/blender/source/blender/src/buttons_scene.c	2008-01-20 14:50:30 UTC (rev 13309)
+++ trunk/blender/source/blender/src/buttons_scene.c	2008-01-20 17:53:58 UTC (rev 13310)
@@ -1165,12 +1165,6 @@
 	BIF_undo_push("Change background picture");
 }
 
-static void ftype_pic(char *name)
-{
-	strcpy(G.scene->r.ftype, name);
-	allqueue(REDRAWBUTSSCENE, 0);
-}
-
 static void run_playanim(char *file) 
 {
 	extern char bprogname[];	/* usiblender.c */
@@ -1269,15 +1263,6 @@
 		else
 			activate_fileselect(FILE_SPECIAL, "SELECT BACKBUF PICTURE", G.scene->r.backbuf, backbuf_pic);
 		break;
-
-	case B_FS_FTYPE:
-		sa= closest_bigger_area();
-		areawinset(sa->win);
-		if(G.qual == LR_CTRLKEY)
-			activate_imageselect(FILE_SPECIAL, "SELECT FTYPE", G.scene->r.ftype, ftype_pic);
-		else
-			activate_fileselect(FILE_SPECIAL, "SELECT FTYPE", G.scene->r.ftype, ftype_pic);
-		break;
 	
 	case B_PR_PAL:
 		G.scene->r.xsch= 720;
@@ -1841,7 +1826,6 @@
 	uiBlock *block;
 	char *strp;
 
-
 	block= uiNewBlock(&curarea->uiblocks, "render_panel_output", UI_EMBOSS, UI_HELV, curarea->win);
 	if(uiNewPanel(curarea, block, "Output", "Render", 0, 0, 318, 204)==0) return;
 	
@@ -1850,17 +1834,19 @@
 	uiDefBut(block, TEX,0,"",							31, 190, 279, 20,G.scene->r.pic, 0.0,79.0, 0, 0, "Directory/name to save rendered Pics to");
 	uiDefIconBut(block, BUT,B_FS_BACKBUF, ICON_FILESEL, 10, 168, 20, 20, 0, 0, 0, 0, 0, "Open Fileselect to get Backbuf image");
 	uiDefBut(block, TEX,0,"",							31, 168, 279, 20,G.scene->r.backbuf, 0.0,79.0, 0, 0, "Image to use as background for rendering");
-	uiDefIconBut(block, BUT,B_FS_FTYPE, ICON_FILESEL,	10, 146, 20, 20, 0, 0, 0, 0, 0, "Open Fileselect to get Ftype image");
-	uiDefBut(block, TEX,0,"",							31, 146, 279, 20,G.scene->r.ftype,0.0,79.0, 0, 0, "Image to use with FTYPE Image type");
 	uiBlockEndAlign(block);
 	
+	uiBlockBeginAlign(block);
+	uiDefButBitI(block, TOG, R_NO_OVERWRITE, B_NOP, "No Overwrite", 10, 142, 90, 20, &G.scene->r.mode, 0.0, 0.0, 0, 0, "Skip rendering frames when the file exists (image output only)");
+	uiDefButBitI(block, TOG, R_TOUCH, B_NOP, "Touch", 100, 142, 50, 20, &G.scene->r.mode, 0.0, 0.0, 0, 0, "Create an empty file before rendering each frame");
+	uiBlockEndAlign(block);
 	
 	/* SET BUTTON */
 	uiBlockBeginAlign(block);
 	id= (ID *)G.scene->set;
 	IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->scene), id, &(G.buts->menunr));
 	if(strp[0])
-		uiDefButS(block, MENU, B_SETBROWSE, strp, 10, 120, 20, 20, &(G.buts->menunr), 0, 0, 0, 0, "Scene to link as a Set");
+		uiDefButS(block, MENU, B_SETBROWSE, strp, 10, 114, 20, 20, &(G.buts->menunr), 0, 0, 0, 0, "Scene to link as a Set");
 	MEM_freeN(strp);
 
 	if(G.scene->set) {
@@ -1872,8 +1858,8 @@
 	uiBlockEndAlign(block);
 
 	uiBlockSetCol(block, TH_BUT_SETTING1);
-	uiDefButBitS(block, TOG, R_BACKBUF, B_NOP,"Backbuf",	10, 94, 80, 20, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image");	

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list