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:
authorNicholas Bishop <nicholasbishop@gmail.com>2010-07-26 09:44:34 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2010-07-26 09:44:34 +0400
commitbdc929ea6b26023c84b400e89341bf88eeb503a5 (patch)
tree3584085292de6d0d7dbd232407b5789166dfad0c
parentef74fc391d7d03061094a507939bf2e5f241c93c (diff)
== Sculpt/Paint ==
* Fixed a crash on loading files with a paint mode active * Fixed a type warning
-rw-r--r--source/blender/blenloader/intern/readfile.c5
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4810d4b8c71..9e786e435be 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4123,8 +4123,9 @@ static void direct_link_object(FileData *fd, Object *ob)
link_list(fd, &ob->pc_ids);
if(ob->paint) {
- create_paintsession(ob);
- ob->paint->sculpt= MEM_callocN(sizeof(SculptSession), "reload sculpt session");
+ ob->paint = MEM_callocN(sizeof(PaintSession), "PaintSession");
+ if(ob->mode & OB_MODE_SCULPT)
+ ob->paint->sculpt= MEM_callocN(sizeof(SculptSession), "reload sculpt session");
}
}
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index c0d7409754d..5419cbf048e 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -1049,7 +1049,7 @@ ViewContext *paint_stroke_view_context(PaintStroke *stroke)
void paint_stroke_projection_mat(PaintStroke *stroke, float (**pmat)[4])
{
- *pmat = &stroke->project_mat;
+ *pmat = stroke->project_mat;
}
void *paint_stroke_mode_data(struct PaintStroke *stroke)