[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44363] trunk/blender/source/blender/imbuf : Fix #30315: Temporary proxy files are not erased and old proxys are not updated if the proxy is built more then once (windows)

Sergey Sharybin sergey.vfx at gmail.com
Thu Feb 23 11:18:19 CET 2012


Revision: 44363
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44363
Author:   nazgul
Date:     2012-02-23 10:18:10 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
Fix #30315: Temporary proxy files are not erased and old proxys are not updated if the proxy is built more then once (windows)

Two issues are fixed here:
- On windows rename() doesn't actually renames file if destination file is already exist.
  Solved by ulinking previously built proxy/timecode.
- IMB_TC_MAX_SLOT was set to incorrect value leading to record run timecode calculating
  several times.

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/IMB_imbuf.h
    trunk/blender/source/blender/imbuf/intern/indexer.c

Modified: trunk/blender/source/blender/imbuf/IMB_imbuf.h
===================================================================
--- trunk/blender/source/blender/imbuf/IMB_imbuf.h	2012-02-23 09:40:10 UTC (rev 44362)
+++ trunk/blender/source/blender/imbuf/IMB_imbuf.h	2012-02-23 10:18:10 UTC (rev 44363)
@@ -199,7 +199,7 @@
 				  device (*every* consumer camcorder can do
 				  that :) )*/
 	IMB_TC_RECORD_RUN_NO_GAPS = 8,
-	IMB_TC_MAX_SLOT   = 8
+	IMB_TC_MAX_SLOT   = 4
 } IMB_Timecode_Type;
 
 typedef enum IMB_Proxy_Size {

Modified: trunk/blender/source/blender/imbuf/intern/indexer.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/indexer.c	2012-02-23 09:40:10 UTC (rev 44362)
+++ trunk/blender/source/blender/imbuf/intern/indexer.c	2012-02-23 10:18:10 UTC (rev 44363)
@@ -147,6 +147,7 @@
 	if (rollback) {
 		unlink(fp->temp_name);
 	} else {
+		unlink(fp->name);
 		rename(fp->temp_name, fp->name);
 	}
 
@@ -687,6 +688,7 @@
 	} else {
 		get_proxy_filename(ctx->anim, ctx->proxy_size, 
 		                   fname, FALSE);
+		unlink(fname);
 		rename(fname_tmp, fname);
 	}
 	
@@ -1043,6 +1045,7 @@
 			if (*stop) {
 				unlink(fname_tmp);
 			} else {
+				unlink(fname);
 				rename(fname_tmp, fname);
 			}
 		}




More information about the Bf-blender-cvs mailing list