linking in mesh data with animation crashed blender. also fixed some warnings.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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++;}
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include "BKE_utildefines.h"
|
||||
|
||||
#include "ED_util.h"
|
||||
#include "ED_mesh.h"
|
||||
|
||||
#include "UI_interface.h"
|
||||
#include "UI_resources.h"
|
||||
|
||||
Reference in New Issue
Block a user