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
diff options
context:
space:
mode:
authorAndrea Weikert <elubie@gmx.net>2007-09-02 21:25:03 +0400
committerAndrea Weikert <elubie@gmx.net>2007-09-02 21:25:03 +0400
commit356ab943736e8a2434a8ff5845873482597ba5e2 (patch)
tree910356ace904dc4f11f1daf15330bb0827934f5b /source/blender/quicktime
parent22c23fb04f7f1297b971f03d69b8b04b7dd9caa4 (diff)
== imagebrowser ==
Initial commit of imagebrowser in trunk. BIG COMMIT! Main changes: * completely reworked imasel space * creation and storage of the preview images for materials, textures, world and lamp * thumbnails of images and movie files when browsing in the file system * loading previews from external .blend when linking or appending * thumbnail caching according to the Thumbnail Managing Standard: http://jens.triq.net/thumbnail-spec/ * for now just kept imasel access mostly as old imgbrowser (CTRL+F4, CTRL+F1) a bit hidden still. * filtering of file types (images, movies, .blend, py,...) * preliminary managing of bookmarks ('B' button to add, XKEY while bookmark active to delete) More detailed info which will be updated here: http://wiki.blender.org/index.php/User:Elubie/PreviewImageBrowser Places that need special review (and probably fixes): * BLO_blendhandle_get_previews in readblenentry * readfile.c: do_version and refactorings of do_library_append * UI integration TODO and known issues still: * Accented characters do not display correctly with international fonts * Crash was reported when browsing in directory with movie files * Bookmark management still needs some UI work (second scrollbar?), feedback here is welcome! Credits: Samir Bharadwaj (samirbharadwaj@yahoo.com) for the icon images. Many thanks to everyone who gave feedback and helped so far!
Diffstat (limited to 'source/blender/quicktime')
-rw-r--r--source/blender/quicktime/apple/quicktime_import.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/quicktime/apple/quicktime_import.c b/source/blender/quicktime/apple/quicktime_import.c
index c701d4d41d0..862b20b5260 100644
--- a/source/blender/quicktime/apple/quicktime_import.c
+++ b/source/blender/quicktime/apple/quicktime_import.c
@@ -244,6 +244,7 @@ static OSErr QT_get_frameIndexes(struct anim *anim)
TimeValue nextTime = 0;
TimeValue startPoint;
TimeValue tmpstartPoint;
+ long sampleCount = 0;
startPoint = -1;
@@ -254,12 +255,12 @@ static OSErr QT_get_frameIndexes(struct anim *anim)
anim->qtime->framecount = 0;
- while(tmpstartPoint != -1) {
- nextTime = 0;
- GetMovieNextInterestingTime(anim->qtime->movie, nextTimeMediaSample, 1, &media, tmpstartPoint, 0, &nextTime, NULL);
- tmpstartPoint = nextTime;
- anim->qtime->framecount ++;
- }
+ sampleCount = GetMediaSampleCount(anim->qtime->theMedia);
+ anErr = GetMoviesError();
+ if (anErr != noErr) return anErr;
+
+ anim->qtime->framecount = sampleCount;
+
anim->qtime->frameIndex = (TimeValue *) MEM_callocN(sizeof(TimeValue) * anim->qtime->framecount, "qtframeindex");
//rewind
@@ -403,6 +404,7 @@ int startquicktime (struct anim *anim)
char *qtname;
Str255 dst;
#endif
+ short depth = 0;
anim->qtime = MEM_callocN (sizeof(QuicktimeMovie),"animqt");
anim->qtime->have_gw = FALSE;
@@ -483,6 +485,9 @@ int startquicktime (struct anim *anim)
anim->qtime->offscreenGWorld,
GetGWorldDevice(anim->qtime->offscreenGWorld));
SetMoviePlayHints(anim->qtime->movie, hintsHighQuality, hintsHighQuality);
+
+ // sets Media and Track!
+ depth = GetFirstVideoTrackPixelDepth(anim);
QT_get_frameIndexes(anim);
}
@@ -491,7 +496,7 @@ int startquicktime (struct anim *anim)
LockPixels(anim->qtime->offscreenPixMap);
//fill blender's anim struct
- anim->qtime->depth = GetFirstVideoTrackPixelDepth(anim);
+ anim->qtime->depth = depth;
anim->duration = anim->qtime->framecount;
anim->params = 0;