[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29573] branches/soc-2010-nicolasbishop/ source/blender/editors: * Changed a couple mesh functions to make them public within the editors module
Nicholas Bishop
nicholasbishop at gmail.com
Sun Jun 20 01:54:22 CEST 2010
Revision: 29573
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29573
Author: nicholasbishop
Date: 2010-06-20 01:54:22 +0200 (Sun, 20 Jun 2010)
Log Message:
-----------
* Changed a couple mesh functions to make them public within the editors module
Modified Paths:
--------------
branches/soc-2010-nicolasbishop/source/blender/editors/include/ED_mesh.h
branches/soc-2010-nicolasbishop/source/blender/editors/mesh/mesh_data.c
Modified: branches/soc-2010-nicolasbishop/source/blender/editors/include/ED_mesh.h
===================================================================
--- branches/soc-2010-nicolasbishop/source/blender/editors/include/ED_mesh.h 2010-06-19 23:37:12 UTC (rev 29572)
+++ branches/soc-2010-nicolasbishop/source/blender/editors/include/ED_mesh.h 2010-06-19 23:54:22 UTC (rev 29573)
@@ -54,6 +54,7 @@
struct Material;
struct Object;
struct rcti;
+struct CustomDataLayer;
#define EM_FGON_DRAW 1 // face flag
#define EM_FGON 2 // edge and face flag both
@@ -210,6 +211,8 @@
/* mesh_data.c */
+void ED_mesh_delete_customdata_layer(struct bContext *C, struct Object *ob, struct CustomDataLayer *layer);
+
void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces);
void ED_mesh_transform(struct Mesh *me, float *mat);
void ED_mesh_calc_normals(struct Mesh *me);
@@ -221,5 +224,7 @@
int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me);
int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me);
+int ED_mesh_layers_poll(struct bContext *C);
+
#endif /* ED_MESH_H */
Modified: branches/soc-2010-nicolasbishop/source/blender/editors/mesh/mesh_data.c
===================================================================
--- branches/soc-2010-nicolasbishop/source/blender/editors/mesh/mesh_data.c 2010-06-19 23:37:12 UTC (rev 29572)
+++ branches/soc-2010-nicolasbishop/source/blender/editors/mesh/mesh_data.c 2010-06-19 23:54:22 UTC (rev 29573)
@@ -68,7 +68,7 @@
#include "mesh_intern.h"
-static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *layer)
+void ED_mesh_delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *layer)
{
Mesh *me = ob->data;
CustomData *data= (me->edit_mesh)? &me->edit_mesh->fdata: &me->fdata;
@@ -206,7 +206,7 @@
if(!cdl)
return 0;
- delete_customdata_layer(C, ob, cdl);
+ ED_mesh_delete_customdata_layer(C, ob, cdl);
DAG_id_flush_update(&me->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
@@ -266,7 +266,7 @@
if(!cdl)
return 0;
- delete_customdata_layer(C, ob, cdl);
+ ED_mesh_delete_customdata_layer(C, ob, cdl);
DAG_id_flush_update(&me->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
@@ -275,7 +275,7 @@
/*********************** UV texture operators ************************/
-static int layers_poll(bContext *C)
+int ED_mesh_layers_poll(bContext *C)
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
ID *data= (ob)? ob->data: NULL;
@@ -302,7 +302,7 @@
ot->idname= "MESH_OT_uv_texture_add";
/* api callbacks */
- ot->poll= layers_poll;
+ ot->poll= ED_mesh_layers_poll;
ot->exec= uv_texture_add_exec;
/* flags */
@@ -377,7 +377,7 @@
ot->idname= "MESH_OT_drop_named_image";
/* api callbacks */
- ot->poll= layers_poll;
+ ot->poll= ED_mesh_layers_poll;
ot->invoke= drop_named_image_invoke;
/* flags */
@@ -407,7 +407,7 @@
ot->idname= "MESH_OT_uv_texture_remove";
/* api callbacks */
- ot->poll= layers_poll;
+ ot->poll= ED_mesh_layers_poll;
ot->exec= uv_texture_remove_exec;
/* flags */
@@ -436,7 +436,7 @@
ot->idname= "MESH_OT_vertex_color_add";
/* api callbacks */
- ot->poll= layers_poll;
+ ot->poll= ED_mesh_layers_poll;
ot->exec= vertex_color_add_exec;
/* flags */
@@ -463,7 +463,7 @@
/* api callbacks */
ot->exec= vertex_color_remove_exec;
- ot->poll= layers_poll;
+ ot->poll= ED_mesh_layers_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -497,7 +497,7 @@
ot->idname= "MESH_OT_sticky_add";
/* api callbacks */
- ot->poll= layers_poll;
+ ot->poll= ED_mesh_layers_poll;
ot->exec= sticky_add_exec;
/* flags */
@@ -529,7 +529,7 @@
ot->idname= "MESH_OT_sticky_remove";
/* api callbacks */
- ot->poll= layers_poll;
+ ot->poll= ED_mesh_layers_poll;
ot->exec= sticky_remove_exec;
/* flags */
More information about the Bf-blender-cvs
mailing list