svn merge ^/trunk/blender -r44118:44136
[blender.git] / source / blender / editors / mesh / mesh_navmesh.c
index 9593e54acd72bc9021e50fb491e858e26bdd4cf3..99947cb9ae21dadafa26b895175f4172806a2d54 100644 (file)
@@ -618,7 +618,7 @@ static int navmesh_obmode_data_poll(bContext *C)
        Object *ob = ED_object_active_context(C);
        if (ob && (ob->mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
                Mesh *me= ob->data;
-               return CustomData_has_layer(&me->fdata, CD_RECAST);
+               return CustomData_has_layer(&me->pdata, CD_RECAST);
        }
        return FALSE;
 }
@@ -637,7 +637,7 @@ static int navmesh_reset_exec(bContext *C, wmOperator *UNUSED(op))
        Object *ob = ED_object_active_context(C);
        Mesh *me= ob->data;
 
-       CustomData_free_layers(&me->fdata, CD_RECAST, me->totface);
+       CustomData_free_layers(&me->pdata, CD_RECAST, me->totpoly);
 
        BKE_mesh_ensure_navmesh(me);
 
@@ -667,7 +667,7 @@ static int navmesh_clear_exec(bContext *C, wmOperator *UNUSED(op))
        Object *ob = ED_object_active_context(C);
        Mesh *me= ob->data;
 
-       CustomData_free_layers(&me->fdata, CD_RECAST, me->totface);
+       CustomData_free_layers(&me->pdata, CD_RECAST, me->totpoly);
 
        DAG_id_tag_update(&me->id, OB_RECALC_DATA);
        WM_event_add_notifier(C, NC_GEOM|ND_DATA, &me->id);