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:
authorRob Haarsma <phaseIV@zonnet.nl>2003-02-09 18:16:36 +0300
committerRob Haarsma <phaseIV@zonnet.nl>2003-02-09 18:16:36 +0300
commit000b0efb7dbf563af91c798ad97142e46f674e6e (patch)
tree794db23477b4c6fc45552396c264507af149bea5 /source
parent0841582d0b7759442aa5667dc91ea7102c80fc07 (diff)
prevented loading of .dotfiles as an image,
bugfix added for illegal avi/anim handling.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/imasel.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/source/blender/src/imasel.c b/source/blender/src/imasel.c
index 3b1ee2e1177..c1fe8686da4 100644
--- a/source/blender/src/imasel.c
+++ b/source/blender/src/imasel.c
@@ -502,6 +502,21 @@ void get_next_image(SpaceImaSel *simasel)
animlen= IMB_anim_get_duration(anim);
ibuf = IMB_anim_absolute(anim, animlen / 2);
+
+ if(ibuf) {
+ //get icon dimensions for movie
+ ima->orgx = ibuf->x;
+ ima->orgy = ibuf->y;
+// ima->orgd = ibuf->depth;
+
+ if (ima->orgx > ima->orgy){
+ ima->dw = 64;
+ ima->dh = (short)(62 * ((float)ima->orgy / (float)ima->orgx));
+ }else{
+ ima->dw = (short)(64 * ((float)ima->orgx / (float)ima->orgy));
+ ima->dh = 62;
+ }
+ }
IMB_free_anim(anim);
}
@@ -669,13 +684,17 @@ void get_file_info(SpaceImaSel *simasel)
strcpy(name , simasel->dir);
strcat(name , direntry->name);
- if (IMB_ispic(name)) {
- direntry->type = IMS_IMA;
- }else{
- if (IMB_isanim(name)) {
- direntry->type = IMS_ANIM;
+ if(direntry->name[0] == '.') {
+ direntry->type = IMS_NOIMA;
+ } else {
+ if (IMB_ispic(name)) {
+ direntry->type = IMS_IMA;
}else{
- direntry->type = IMS_NOIMA;
+ if (IMB_isanim(name)) {
+ direntry->type = IMS_ANIM;
+ }else{
+ direntry->type = IMS_NOIMA;
+ }
}
}