diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-17 09:58:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-17 09:58:06 +0400 |
commit | e546d7666b753480995dc54c0cf68a3011dd28f0 (patch) | |
tree | 006c822d9c4bd9133636aa11dc0964eeb25aa7b3 /source/blender/blenkernel/intern/image.c | |
parent | 5ae75d5dc841a6fa33b8ead55bc6fbe89bb8b767 (diff) |
minor changes needed for the next commit.
- BKE_add_image_extension now sets the extension rather then appending. (no more image.jpg.tga)
- py/rna functions which have no return value now raise an error if a non-None value is returned.
- added back the red-alert flag so buttons can have a red highlight if somethings wrong.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index e77183d785f..f3dfd4292c6 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -757,9 +757,9 @@ int BKE_imtype_is_movie(int imtype) return 0; } -void BKE_add_image_extension(char *string, int imtype) +int BKE_add_image_extension(char *string, int imtype) { - char *extension=""; + char *extension= NULL; if(imtype== R_IRIS) { if(!BLI_testextensie(string, ".rgb")) @@ -830,7 +830,12 @@ void BKE_add_image_extension(char *string, int imtype) extension= ".jpg"; } - strcat(string, extension); + if(extension) { + return BLI_replace_extension(string, FILE_MAX, extension); + } + else { + return FALSE; + } } /* could allow access externally - 512 is for long names, 64 is for id names */ |