Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-12-21 15:01:08 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-12-21 15:01:08 +0400
commit8fbff6100d9dc2430b98b61f4681a3afff24acae (patch)
tree5ecdb61230e7cc944091493b3a45037b3643d369 /source
parent056c49e9ec53849f75aa091f9a98638e77eb82f5 (diff)
Added Record run no gaps timecode for movie clips.
Also get rid of hardcoded constants in readfile and use constants from ImBuf headers.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/movieclip.c5
-rw-r--r--source/blender/blenloader/CMakeLists.txt1
-rw-r--r--source/blender/blenloader/SConscript2
-rw-r--r--source/blender/blenloader/intern/readfile.c16
-rw-r--r--source/blender/makesrna/intern/rna_movieclip.c1
5 files changed, 20 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 75d8ec584e8..736c889f66c 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -372,7 +372,10 @@ static MovieClip *movieclip_alloc(const char *name)
BKE_tracking_init_settings(&clip->tracking);
clip->proxy.build_size_flag= IMB_PROXY_25;
- clip->proxy.build_tc_flag= IMB_TC_RECORD_RUN|IMB_TC_FREE_RUN|IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN;
+ clip->proxy.build_tc_flag= IMB_TC_RECORD_RUN |
+ IMB_TC_FREE_RUN |
+ IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN |
+ IMB_TC_RECORD_RUN_NO_GAPS;
clip->proxy.quality= 90;
return clip;
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index 9cf721738a7..35271f7b873 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -32,6 +32,7 @@ set(INC
../nodes
../render/extern/include
../../../intern/guardedalloc
+ ../imbuf
)
set(INC_SYS
diff --git a/source/blender/blenloader/SConscript b/source/blender/blenloader/SConscript
index d5d2df3ea35..0333eab7e1f 100644
--- a/source/blender/blenloader/SConscript
+++ b/source/blender/blenloader/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('intern/*.c')
incs = '. #/intern/guardedalloc ../blenlib ../blenkernel'
incs += ' ../makesdna ../editors/include'
-incs += ' ../render/extern/include ../makesrna ../nodes'
+incs += ' ../render/extern/include ../makesrna ../nodes ../imbuf'
incs += ' ' + env['BF_ZLIB_INC']
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 593b526d38b..bf40a3e73b3 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -139,6 +139,8 @@
#include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER TEST REND
#include "BKE_sound.h"
+#include "IMB_imbuf.h" // for proxy / timecode versioning stuff
+
#include "NOD_socket.h"
//XXX #include "BIF_butspace.h" // badlevel, for do_versions, patching event codes
@@ -12588,10 +12590,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
clip->aspy= 1.0f;
}
- /* XXX: a bit hacky, probably include imbuf and use real constants are nicer */
- clip->proxy.build_tc_flag= 7;
+ clip->proxy.build_tc_flag= IMB_TC_RECORD_RUN |
+ IMB_TC_FREE_RUN |
+ IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN;
+
if(clip->proxy.build_size_flag==0)
- clip->proxy.build_size_flag= 1;
+ clip->proxy.build_size_flag= IMB_PROXY_25;
if(clip->proxy.quality==0)
clip->proxy.quality= 90;
@@ -12731,6 +12735,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
scene->gm.exitkey = 218; // Blender key code for ESC
}
}
+ {
+ MovieClip *clip;
+ for(clip= main->movieclip.first; clip; clip= clip->id.next) {
+ clip->proxy.build_tc_flag|= IMB_TC_RECORD_RUN_NO_GAPS;
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c
index 3b1ac8f22c3..fbc6a0155f2 100644
--- a/source/blender/makesrna/intern/rna_movieclip.c
+++ b/source/blender/makesrna/intern/rna_movieclip.c
@@ -78,6 +78,7 @@ static void rna_def_movieclip_proxy(BlenderRNA *brna)
{IMB_TC_RECORD_RUN, "RECORD_RUN", 0, "Record Run", "Use images in the order they are recorded"},
{IMB_TC_FREE_RUN, "FREE_RUN", 0, "Free Run", "Use global timestamp written by recording device"},
{IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN, "FREE_RUN_REC_DATE", 0, "Free Run (rec date)", "Interpolate a global timestamp using the record date and time written by recording device"},
+ {IMB_TC_RECORD_RUN_NO_GAPS, "FREE_RUN_NO_GAPS", 0, "Free Run No Gaps", "Record run, but ignore timecode, changes in framerate or dropouts"},
{0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "MovieClipProxy", NULL);