forked from bartvdbraak/blender
Image/Animation loading, remove user-pref extension check.
don't use extension checking preference for low level loading functions, otherwise a user preference may impact a script loading a file for example. looked into making this an argument and passing it in, but theres no real advantage and its simpler just to remove.
This commit is contained in:
parent
107566ebf1
commit
b783140ef6
@ -46,7 +46,6 @@
|
|||||||
#include "BLI_fileops.h"
|
#include "BLI_fileops.h"
|
||||||
#include "BLI_string.h"
|
#include "BLI_string.h"
|
||||||
|
|
||||||
#include "DNA_userdef_types.h"
|
|
||||||
#include "BKE_global.h"
|
#include "BKE_global.h"
|
||||||
|
|
||||||
#include "imbuf.h"
|
#include "imbuf.h"
|
||||||
@ -181,7 +180,7 @@ const char *imb_ext_audio[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static int IMB_ispic_name(const char *name)
|
int IMB_ispic(const char *name)
|
||||||
{
|
{
|
||||||
/* increased from 32 to 64 because of the bitmaps header size */
|
/* increased from 32 to 64 because of the bitmaps header size */
|
||||||
#define HEADER_SIZE 64
|
#define HEADER_SIZE 64
|
||||||
@ -231,24 +230,6 @@ static int IMB_ispic_name(const char *name)
|
|||||||
#undef HEADER_SIZE
|
#undef HEADER_SIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
int IMB_ispic(const char *filename)
|
|
||||||
{
|
|
||||||
if (U.uiflag & USER_FILTERFILEEXTS) {
|
|
||||||
if ((BLI_testextensie_array(filename, imb_ext_image)) ||
|
|
||||||
(G.have_quicktime && BLI_testextensie_array(filename, imb_ext_image_qt)))
|
|
||||||
{
|
|
||||||
return IMB_ispic_name(filename);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { /* no FILTERFILEEXTS */
|
|
||||||
return IMB_ispic_name(filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static int isavi(const char *name)
|
static int isavi(const char *name)
|
||||||
{
|
{
|
||||||
@ -454,27 +435,7 @@ bool IMB_isanim(const char *filename)
|
|||||||
{
|
{
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
if (U.uiflag & USER_FILTERFILEEXTS) {
|
|
||||||
if (G.have_quicktime) {
|
|
||||||
if (BLI_testextensie_array(filename, imb_ext_movie_qt)) {
|
|
||||||
type = imb_get_anim_type(filename);
|
type = imb_get_anim_type(filename);
|
||||||
}
|
|
||||||
else {
|
|
||||||
return(FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { /* no quicktime */
|
|
||||||
if (BLI_testextensie_array(filename, imb_ext_movie)) {
|
|
||||||
type = imb_get_anim_type(filename);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return(FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else { /* no FILTERFILEEXTS */
|
|
||||||
type = imb_get_anim_type(filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (type && type != ANIM_SEQUENCE);
|
return (type && type != ANIM_SEQUENCE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user