diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-03 19:04:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-03 19:04:24 +0400 |
commit | 03b07a719f186bfed15f9465555ec072a262deaa (patch) | |
tree | 2e61627c23fa05bed9fc3812d64106890d0dbf63 /source/blender/editors | |
parent | 13ec0cd6c3c74c7f324cefff064bb725cc26fcd2 (diff) |
code cleanup: unused functions
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/BIF_glutil.h | 28 | ||||
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 3 | ||||
-rw-r--r-- | source/blender/editors/include/ED_util.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/glutil.c | 22 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_intern.h | 6 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_intern.h | 6 | ||||
-rw-r--r-- | source/blender/editors/util/ed_util.c | 11 |
11 files changed, 37 insertions, 51 deletions
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index 650e4527196..a356821fb53 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -173,35 +173,19 @@ void glaDefine2DArea(struct rcti *screen_rect); typedef struct gla2DDrawInfo gla2DDrawInfo; -/** Save the current OpenGL state and initialize OpenGL for 2D - * rendering. glaEnd2DDraw should be called on the returned structure - * to free it and to return OpenGL to its previous state. The - * scissor rectangle is set to match the viewport. - * - * See glaDefine2DArea for an explanation of why this function uses integers. - * - * \param screen_rect The screen rectangle to be used for 2D drawing. - * \param world_rect The world rectangle that the 2D area represented - * by \a screen_rect is supposed to represent. If NULL it is assumed the - * world has a 1 to 1 mapping to the screen. - */ -gla2DDrawInfo *glaBegin2DDraw(struct rcti *screen_rect, struct rctf *world_rect); +/* UNUSED */ +#if 0 -/** Translate the (\a wo_x, \a wo_y) point from world coordinates into screen space. */ -void gla2DDrawTranslatePt(gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r); - -/** Translate the \a world point from world coordiantes into screen space. */ +gla2DDrawInfo *glaBegin2DDraw(struct rcti *screen_rect, struct rctf *world_rect); +void gla2DDrawTranslatePt(gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r); void gla2DDrawTranslatePtv(gla2DDrawInfo *di, float world[2], int screen_r[2]); -/* Restores the previous OpenGL state and free's the auxilary - * gla data. - */ -void glaEnd2DDraw(gla2DDrawInfo *di); +void glaEnd2DDraw(gla2DDrawInfo *di); /** Adjust the transformation mapping of a 2d area */ void gla2DGetMap(gla2DDrawInfo *di, struct rctf *rect); void gla2DSetMap(gla2DDrawInfo *di, struct rctf *rect); - +#endif /* use this for platform hacks. glPointSize is solved here */ void bglBegin(int mode); diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index ab112fde48d..a39476dad66 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -251,7 +251,6 @@ void ED_mesh_vertices_remove(struct Mesh *mesh, struct ReportList *reports, int void ED_mesh_transform(struct Mesh *me, float *mat); void ED_mesh_calc_normals(struct Mesh *me); void ED_mesh_calc_tessface(struct Mesh *mesh); -void ED_mesh_material_link(struct Mesh *me, struct Material *ma); void ED_mesh_update(struct Mesh *mesh, struct bContext *C, int calc_edges, int calc_tessface); int ED_mesh_uv_texture_add(struct Mesh *me, const char *name, const bool active_set); diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index f0992655ad3..5fe44aa17f7 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -113,7 +113,8 @@ struct Base; struct Scene; struct Object; -int BIF_snappingSupported(struct Object *obedit); +/* UNUSED */ +// int BIF_snappingSupported(struct Object *obedit); struct TransformOrientation; struct bContext; diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index d0ca079b8c9..67f790f0b46 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -90,7 +90,6 @@ void ED_clipboard_posebuf_free(void); /* ************** XXX OLD CRUFT WARNING ************* */ void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert); -int GetButStringLength(const char *str); /* where else to go ? */ void unpack_menu(struct bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf); diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 2572d4b4d99..20e867b5c98 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -803,7 +803,6 @@ uiBlock *uiLayoutAbsoluteBlock(uiLayout *layout); /* templates */ void uiTemplateHeader(uiLayout *layout, struct bContext *C, int menus); -void uiTemplateDopeSheetFilter(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr); void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop); void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, @@ -836,7 +835,6 @@ void uiOperatorSearch_But(uiBut *but); void uiTemplateOperatorSearch(uiLayout *layout); void uiTemplateHeader3D(uiLayout *layout, struct bContext *C); void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C); -void uiTemplateTextureImage(uiLayout *layout, struct bContext *C, struct Tex *tex); void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C); void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr); void uiTemplateComponentMenu(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name); diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 74086c7cc8b..b5c2b106a15 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -759,6 +759,18 @@ void gla2DSetMap(gla2DDrawInfo *di, rctf *rect) di->wo_to_sc[1] = sc_h / wo_h; } +/** Save the current OpenGL state and initialize OpenGL for 2D + * rendering. glaEnd2DDraw should be called on the returned structure + * to free it and to return OpenGL to its previous state. The + * scissor rectangle is set to match the viewport. + * + * See glaDefine2DArea for an explanation of why this function uses integers. + * + * \param screen_rect The screen rectangle to be used for 2D drawing. + * \param world_rect The world rectangle that the 2D area represented + * by \a screen_rect is supposed to represent. If NULL it is assumed the + * world has a 1 to 1 mapping to the screen. + */ gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect) { gla2DDrawInfo *di = MEM_mallocN(sizeof(*di), "gla2DDrawInfo"); @@ -794,17 +806,27 @@ gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect) return di; } +/** + * Translate the (\a wo_x, \a wo_y) point from world coordinates into screen space. + */ void gla2DDrawTranslatePt(gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r) { *sc_x_r = (wo_x - di->world_rect.xmin) * di->wo_to_sc[0]; *sc_y_r = (wo_y - di->world_rect.ymin) * di->wo_to_sc[1]; } + +/** + * Translate the \a world point from world coordiantes into screen space. + */ void gla2DDrawTranslatePtv(gla2DDrawInfo *di, float world[2], int screen_r[2]) { screen_r[0] = (world[0] - di->world_rect.xmin) * di->wo_to_sc[0]; screen_r[1] = (world[1] - di->world_rect.ymin) * di->wo_to_sc[1]; } +/** + * Restores the previous OpenGL state and free's the auxilary gla data. + */ void glaEnd2DDraw(gla2DDrawInfo *di) { glViewport(di->orig_vp[0], di->orig_vp[1], di->orig_vp[2], di->orig_vp[3]); diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 82a07c9e3be..1060999e13f 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -54,8 +54,6 @@ struct SculptUndoNode; /* Interface */ struct MultiresModifierData *sculpt_multires_active(struct Scene *scene, struct Object *ob); -void sculpt(struct Sculpt *sd); - int sculpt_mode_poll(struct bContext *C); int sculpt_mode_poll_view3d(struct bContext *C); int sculpt_poll(struct bContext *C); diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 774220764e7..773d6031ee1 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -275,9 +275,9 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar, /* non-scaled proxy shouldn't use filtering */ if ((clip->flag & MCLIP_USE_PROXY) == 0 || ELEM(sc->user.render_size, MCLIP_PROXY_RENDER_SIZE_FULL, MCLIP_PROXY_RENDER_SIZE_100)) - { - filter = GL_NEAREST; - } + { + filter = GL_NEAREST; + } glaDrawImBuf_glsl_ctx(C, ibuf, x, y, GL_NEAREST); diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 4d307ccde84..b45ca8b228f 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -155,10 +155,6 @@ void NODE_OT_group_insert(struct wmOperatorType *ot); void NODE_OT_group_ungroup(struct wmOperatorType *ot); void NODE_OT_group_separate(struct wmOperatorType *ot); void NODE_OT_group_edit(struct wmOperatorType *ot); -void NODE_OT_group_socket_add(struct wmOperatorType *ot); -void NODE_OT_group_socket_remove(struct wmOperatorType *ot); -void NODE_OT_group_socket_move_up(struct wmOperatorType *ot); -void NODE_OT_group_socket_move_down(struct wmOperatorType *ot); /* node_relationships.c */ @@ -181,9 +177,7 @@ void snode_notify(struct bContext *C, struct SpaceNode *snode); void snode_dag_update(struct bContext *C, struct SpaceNode *snode); void snode_set_context(const struct bContext *C); -bNode *node_tree_get_editgroup(bNodeTree *ntree); void snode_update(struct SpaceNode *snode, struct bNode *node); -bNode *editnode_get_active(bNodeTree *ntree); int composite_node_active(struct bContext *C); int node_has_hidden_sockets(bNode *node); diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index 32a6c49da89..a0212bd17fa 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -54,7 +54,8 @@ struct ARegion *sequencer_has_buttons_region(struct ScrArea *sa); void draw_timeline_seq(const struct bContext *C, struct ARegion *ar); void draw_image_seq(const struct bContext *C, struct Scene *scene, struct ARegion *ar, struct SpaceSeq *sseq, int cfra, int offset, int draw_overlay); -void seq_reset_imageofs(struct SpaceSeq *sseq); +/* UNUSED */ +// void seq_reset_imageofs(struct SpaceSeq *sseq); struct ImBuf *sequencer_ibuf_get(struct Main *bmain, struct Scene *scene, struct SpaceSeq *sseq, int cfra, int frame_ofs); @@ -69,7 +70,8 @@ int seq_effect_find_selected(struct Scene *scene, struct Sequence *activeseq, in /* operator helpers */ int sequencer_edit_poll(struct bContext *C); -int sequencer_strip_poll(struct bContext *C); +/* UNUSED */ +//int sequencer_strip_poll(struct bContext *C); int sequencer_strip_has_path_poll(struct bContext *C); int sequencer_view_poll(struct bContext *C); diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 7e14e8cf2a3..35e6c40c36b 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -162,17 +162,6 @@ void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, fl } } -#if 0 /* UNUSED */ -int GetButStringLength(const char *str) -{ - int rt; - - rt = UI_GetStringWidth(str); - - return rt + 15; -} -#endif - void unpack_menu(bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf) { PointerRNA props_ptr; |