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:
authorAlexander Ewering <blender@instinctive.de>2005-07-30 05:14:59 +0400
committerAlexander Ewering <blender@instinctive.de>2005-07-30 05:14:59 +0400
commit7de4b17263dbac431ccfb6fb575845c5863c0d7f (patch)
tree58da37d96cbfd9c1ddd1a4ecae67b044cd05f18c /source/blender
parentd44e6153d1993acd11cd17ac5f41fd1e00ba2f10 (diff)
Fixing (hopefully) a stupid issue with rendering text objects:
cu->curinfo.mat_nr appearently didn't get initialized to 0 when creating a new curve / text object, thus assigning random material indices to characters, which crashed when rendering. I'm still not sure if this was the actual issue, though I'd hope so :) For old files that crash on rendering, just enter editmode on EACH text object, select all text, and assign a material to it. I hope this fixes.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/src/editfont.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/src/editfont.c b/source/blender/src/editfont.c
index ec627fb9f1d..56ac38add2e 100644
--- a/source/blender/src/editfont.c
+++ b/source/blender/src/editfont.c
@@ -834,8 +834,11 @@ void do_textedit(unsigned short event, short val, char _ascii)
}
}
if(doit || cursmove) {
-
- if (cu->pos) cu->curinfo = textbufinfo[cu->pos-1];
+
+ if (cu->pos) {
+ cu->curinfo = textbufinfo[cu->pos-1];
+ } else cu->curinfo = textbufinfo[0];
+
if (G.obedit->totcol>0) {
G.obedit->actcol = textbufinfo[cu->pos-1].mat_nr;
}
@@ -926,6 +929,10 @@ void make_editText(void)
cu->strinfo= textbufinfo;
if(cu->pos>cu->len) cu->pos= cu->len;
+
+ if (cu->pos) {
+ cu->curinfo = textbufinfo[cu->pos-1];
+ } else cu->curinfo = textbufinfo[0];
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);