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>2011-10-10 01:11:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-10 01:11:51 +0400
commit7306eb84f07c92a5bced22f7f38dd7de1770c425 (patch)
treebbf9ba1bdbeae8ce5be45972314ed32905e3a9a5 /source/blender/editors/mesh/mesh_navmesh.c
parent9d70e050a27ce4700e0e16dd120c343bd5ecc2a6 (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.c9
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;
}