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>2010-02-02 21:24:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-02 21:24:10 +0300
commit104f46afdd4f2b3f66a73ddc14582bcb2854ef36 (patch)
treea18ade33270d55820dd3df58649b0c1892451e9d /source/blender
parent21f1625fd537ea439e464e1d2cbd12ad770526ee (diff)
linking in mesh data with animation crashed blender. also fixed some warnings.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c6
-rw-r--r--source/blender/editors/util/editmode_undo.c1
3 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index bdd0d89410d..051bc1851b8 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3310,6 +3310,7 @@ static void lib_link_mesh(FileData *fd, Main *main)
/*Link ID Properties -- and copy this comment EXACTLY for easy finding
of library blocks that implement this.*/
if (me->id.properties) IDP_LibLinkProperty(me->id.properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ if (me->adt) lib_link_animdata(fd, &me->id, me->adt);
/* this check added for python created meshes */
if(me->mat) {
@@ -3397,6 +3398,9 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
mesh->msticky= newdataadr(fd, mesh->msticky);
mesh->dvert= newdataadr(fd, mesh->dvert);
+ mesh->adt= newdataadr(fd, mesh->adt);
+ direct_link_animdata(fd, mesh->adt);
+
/* Partial-mesh visibility (do this before using totvert, totface, or totedge!) */
mesh->pv= newdataadr(fd, mesh->pv);
if(mesh->pv) {
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 7ad65a1cbfc..6986d86ef42 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1536,10 +1536,12 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
if(mface->v4) (me->dvert+mface->v4)->flag= 1;
if(brush->vertexpaint_tool==VP_BLUR) {
- MDeformWeight *dw, *(*dw_func)(MDeformVert *, int) = defvert_verify_index;
+ MDeformWeight *dw, *(*dw_func)(MDeformVert *, int);
if(wp->flag & VP_ONLYVGROUP)
- dw_func= defvert_find_index;
+ dw_func= (void *)defvert_find_index; /* uses a const, cast to quiet warning */
+ else
+ dw_func= defvert_verify_index;
dw= dw_func(me->dvert+mface->v1, ob->actdef-1);
if(dw) {paintweight+= dw->weight; totw++;}
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index f58cd148dec..8d674c1adbe 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -52,6 +52,7 @@
#include "BKE_utildefines.h"
#include "ED_util.h"
+#include "ED_mesh.h"
#include "UI_interface.h"
#include "UI_resources.h"