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:
authorCampbell Barton <ideasman42@gmail.com>2012-12-11 19:14:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-11 19:14:35 +0400
commit570cdb3b6e84b0f95d73d2154fcaf4ec27ea4dca (patch)
tree079a5bba91d4935d56674ec1bc3067bb619af634 /source/blender/blenkernel
parent71730f26d7c816854a471c9733ad4c10b88fd357 (diff)
image stamp data's strings could be short enough not to fit the entire ID name length.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/image.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index f09f128e874..c4ce17c394a 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1400,7 +1400,9 @@ static void timecode_simple_string(char *text, size_t text_size, const int cfra,
}
}
-/* could allow access externally - 512 is for long names, 64 is for id names */
+#define STAMP_NAME_SIZE ((MAX_ID_NAME - 2) + 16)
+/* could allow access externally - 512 is for long names,
+ * STAMP_NAME_SIZE is for id names, allowing them some room for description */
typedef struct StampData {
char file[512];
char note[512];
@@ -1408,12 +1410,13 @@ typedef struct StampData {
char marker[512];
char time[512];
char frame[512];
- char camera[64];
- char cameralens[64];
- char scene[64];
- char strip[64];
- char rendertime[64];
+ char camera[STAMP_NAME_SIZE];
+ char cameralens[STAMP_NAME_SIZE];
+ char scene[STAMP_NAME_SIZE];
+ char strip[STAMP_NAME_SIZE];
+ char rendertime[STAMP_NAME_SIZE];
} StampData;
+#undef STAMP_NAME_SIZE
static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int do_prefix)
{