diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-10 01:11:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-10 01:11:51 +0400 |
commit | 7306eb84f07c92a5bced22f7f38dd7de1770c425 (patch) | |
tree | bbf9ba1bdbeae8ce5be45972314ed32905e3a9a5 /source/blender/editors/mesh/mesh_navmesh.c | |
parent | 9d70e050a27ce4700e0e16dd120c343bd5ecc2a6 (diff) |
move NavMesh draw code out of being a modifier and into DerivedMesh drawing hack (which IMHO is less bad then mis-using a modifier only to override drawing calls).
Diffstat (limited to 'source/blender/editors/mesh/mesh_navmesh.c')
-rw-r--r-- | source/blender/editors/mesh/mesh_navmesh.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c index e4b884744e1..f427b51570b 100644 --- a/source/blender/editors/mesh/mesh_navmesh.c +++ b/source/blender/editors/mesh/mesh_navmesh.c @@ -296,7 +296,6 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh, int i,j, k; unsigned short* v; int face[3]; - Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); Object* obedit; int createob= base==NULL; @@ -305,7 +304,6 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh, unsigned int *meshes; float bmin[3], cs, ch, *dverts; unsigned char *tris; - ModifierData *md; zero_v3(co); zero_v3(rot); @@ -419,11 +417,8 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh, obedit->body_type= OB_BODY_TYPE_NAVMESH; rename_id((ID *)obedit, "Navmesh"); } - - md= modifiers_findByType(obedit, eModifierType_NavMesh); - if(!md) { - ED_object_modifier_add(NULL, bmain, scene, obedit, NULL, eModifierType_NavMesh); - } + + BKE_mesh_ensure_navmesh(obedit->data); return obedit; } |