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:
authorArystanbek Dyussenov <arystan.d@gmail.com>2009-08-05 11:59:49 +0400
committerArystanbek Dyussenov <arystan.d@gmail.com>2009-08-05 11:59:49 +0400
commit7586990ace3a988e720397f47bf95b7bc9d7124b (patch)
treee4d9d76f6638ad489b18785cec1db49c0ff3ba85 /source/blender/makesrna/intern/rna_image_api.c
parent2065c5cf605ea6147cb4097cf4aca7ac003a1ba1 (diff)
- modified BKE_get_image_export_path so that it writes relative path if src file = dest file returning 2 in this case
- modified unit tests for ^ firstly - incorporated Image.get_export_path into FBX exporter script
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 20770ef2957..af059b435b3 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -41,6 +41,11 @@
#include "BKE_utildefines.h"
#include "BKE_image.h"
+/*
+ User should check if returned path exists before copying a file there.
+
+ TODO: it would be better to return a (abs, rel) tuple.
+*/
static char *rna_Image_get_export_path(Image *image, char *dest_dir, int rel)
{
int length = FILE_MAX;