Fix the skin modifier crashing when building without Bullet.

This commit is contained in:
Brecht Van Lommel 2014-09-24 22:05:41 +02:00
parent 0b12e61040
commit a3bb1dca25
3 changed files with 11 additions and 0 deletions

View File

@ -133,6 +133,10 @@ if(WITH_MOD_OCEANSIM)
add_definitions(-DWITH_OCEANSIM)
endif()
if(WITH_BULLET)
add_definitions(-DWITH_BULLET)
endif()
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()

View File

@ -64,6 +64,9 @@ if env['WITH_BF_FLUID']:
if env['WITH_BF_OCEANSIM']:
defs.append('WITH_OCEANSIM')
if env['WITH_BF_BULLET']:
defs.append('WITH_BULLET')
if env['WITH_BF_GAMEENGINE']:
incs.append('#/extern/recastnavigation')
defs.append('WITH_GAMEENGINE')

View File

@ -218,6 +218,7 @@ static bool skin_frame_find_contained_faces(const Frame *frame,
/* Returns true if hull is successfully built, false otherwise */
static bool build_hull(SkinOutput *so, Frame **frames, int totframe)
{
#ifdef WITH_BULLET
BMesh *bm = so->bm;
BMOperator op;
BMIter iter;
@ -326,6 +327,9 @@ static bool build_hull(SkinOutput *so, Frame **frames, int totframe)
BM_mesh_delete_hflag_tagged(bm, BM_ELEM_TAG, BM_EDGE | BM_FACE);
return true;
#else
return false;
#endif
}
/* Returns the average frame side length (frames are rectangular, so