[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34824] trunk/blender/source/blender: many functions in blender are not marked static but should be.

Campbell Barton ideasman42 at gmail.com
Sun Feb 13 15:16:42 CET 2011


Revision: 34824
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34824
Author:   campbellbarton
Date:     2011-02-13 14:16:36 +0000 (Sun, 13 Feb 2011)
Log Message:
-----------
many functions in blender are not marked static but should be.
most local modifier,GPU,ImBuf and Interface functions are now static.

also fixed an error were the fluid modifier definition and the header didnt have the same number of args.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_channels_edit.c
    trunk/blender/source/blender/editors/animation/drivers.c
    trunk/blender/source/blender/editors/include/UI_interface.h
    trunk/blender/source/blender/editors/interface/interface.c
    trunk/blender/source/blender/editors/interface/interface_draw.c
    trunk/blender/source/blender/editors/interface/interface_handlers.c
    trunk/blender/source/blender/editors/interface/interface_layout.c
    trunk/blender/source/blender/editors/interface/interface_ops.c
    trunk/blender/source/blender/editors/interface/interface_panel.c
    trunk/blender/source/blender/editors/interface/interface_regions.c
    trunk/blender/source/blender/editors/interface/interface_templates.c
    trunk/blender/source/blender/editors/interface/interface_widgets.c
    trunk/blender/source/blender/editors/interface/view2d_ops.c
    trunk/blender/source/blender/editors/space_node/node_draw.c
    trunk/blender/source/blender/editors/space_view3d/drawmesh.c
    trunk/blender/source/blender/editors/space_view3d/drawobject.c
    trunk/blender/source/blender/editors/space_view3d/drawvolume.c
    trunk/blender/source/blender/editors/space_view3d/space_view3d.c
    trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c
    trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
    trunk/blender/source/blender/editors/space_view3d/view3d_header.c
    trunk/blender/source/blender/editors/space_view3d/view3d_select.c
    trunk/blender/source/blender/editors/space_view3d/view3d_view.c
    trunk/blender/source/blender/gpu/intern/gpu_buffers.c
    trunk/blender/source/blender/gpu/intern/gpu_codegen.c
    trunk/blender/source/blender/gpu/intern/gpu_draw.c
    trunk/blender/source/blender/gpu/intern/gpu_material.c
    trunk/blender/source/blender/imbuf/intern/jp2.c
    trunk/blender/source/blender/imbuf/intern/thumbs.c
    trunk/blender/source/blender/modifiers/intern/MOD_array.c
    trunk/blender/source/blender/modifiers/intern/MOD_bevel.c
    trunk/blender/source/blender/modifiers/intern/MOD_boolean.c
    trunk/blender/source/blender/modifiers/intern/MOD_boolean_util.c
    trunk/blender/source/blender/modifiers/intern/MOD_build.c
    trunk/blender/source/blender/modifiers/intern/MOD_cloth.c
    trunk/blender/source/blender/modifiers/intern/MOD_collision.c
    trunk/blender/source/blender/modifiers/intern/MOD_curve.c
    trunk/blender/source/blender/modifiers/intern/MOD_decimate.c
    trunk/blender/source/blender/modifiers/intern/MOD_edgesplit.c
    trunk/blender/source/blender/modifiers/intern/MOD_explode.c
    trunk/blender/source/blender/modifiers/intern/MOD_fluidsim.c
    trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c
    trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.h
    trunk/blender/source/blender/modifiers/intern/MOD_hook.c
    trunk/blender/source/blender/modifiers/intern/MOD_mask.c
    trunk/blender/source/blender/modifiers/intern/MOD_mirror.c
    trunk/blender/source/blender/modifiers/intern/MOD_multires.c
    trunk/blender/source/blender/modifiers/intern/MOD_particleinstance.c
    trunk/blender/source/blender/modifiers/intern/MOD_simpledeform.c
    trunk/blender/source/blender/modifiers/intern/MOD_util.h
    trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c
    trunk/blender/source/blender/windowmanager/intern/wm_window.c

Modified: trunk/blender/source/blender/editors/animation/anim_channels_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_edit.c	2011-02-13 13:55:41 UTC (rev 34823)
+++ trunk/blender/source/blender/editors/animation/anim_channels_edit.c	2011-02-13 14:16:36 UTC (rev 34824)
@@ -577,7 +577,7 @@
 };
 
 /* defines for rearranging channels */
-EnumPropertyItem prop_animchannel_rearrange_types[] = {
+static EnumPropertyItem prop_animchannel_rearrange_types[] = {
 	{REARRANGE_ANIMCHAN_TOP, "TOP", 0, "To Top", ""},
 	{REARRANGE_ANIMCHAN_UP, "UP", 0, "Up", ""},
 	{REARRANGE_ANIMCHAN_DOWN, "DOWN", 0, "Down", ""},
@@ -1338,7 +1338,7 @@
 /* ********************** Set Flags Operator *********************** */
 
 /* defines for setting animation-channel flags */
-EnumPropertyItem prop_animchannel_setflag_types[] = {
+static EnumPropertyItem prop_animchannel_setflag_types[] = {
 	{ACHANNEL_SETFLAG_TOGGLE, "TOGGLE", 0, "Toggle", ""},
 	{ACHANNEL_SETFLAG_CLEAR, "DISABLE", 0, "Disable", ""},
 	{ACHANNEL_SETFLAG_ADD, "ENABLE", 0, "Enable", ""},
@@ -1348,7 +1348,7 @@
 
 /* defines for set animation-channel settings */
 // TODO: could add some more types, but those are really quite dependent on the mode...
-EnumPropertyItem prop_animchannel_settings_types[] = {
+static EnumPropertyItem prop_animchannel_settings_types[] = {
 	{ACHANNEL_SETTING_PROTECT, "PROTECT", 0, "Protect", ""},
 	{ACHANNEL_SETTING_MUTE, "MUTE", 0, "Mute", ""},
 	{0, NULL, 0, NULL, NULL}

Modified: trunk/blender/source/blender/editors/animation/drivers.c
===================================================================
--- trunk/blender/source/blender/editors/animation/drivers.c	2011-02-13 13:55:41 UTC (rev 34823)
+++ trunk/blender/source/blender/editors/animation/drivers.c	2011-02-13 14:16:36 UTC (rev 34824)
@@ -75,7 +75,7 @@
  *			1 - add new Driver FCurve, 
  *			-1 - add new Driver FCurve without driver stuff (for pasting)
  */
-FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_index, short add)
+static FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_index, short add)
 {
 	AnimData *adt;
 	FCurve *fcu;

Modified: trunk/blender/source/blender/editors/include/UI_interface.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_interface.h	2011-02-13 13:55:41 UTC (rev 34823)
+++ trunk/blender/source/blender/editors/include/UI_interface.h	2011-02-13 14:16:36 UTC (rev 34824)
@@ -760,6 +760,10 @@
 
 int UI_GetStringWidth(const char *str); // XXX temp
 void UI_DrawString(float x, float y, const char *str); // XXX temp
+void UI_DrawTriIcon(float x, float y, char dir);
 
+/* linker workaround ack! */
+void UI_template_fix_linking(void);
+
 #endif /*  UI_INTERFACE_H */
 

Modified: trunk/blender/source/blender/editors/interface/interface.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface.c	2011-02-13 13:55:41 UTC (rev 34823)
+++ trunk/blender/source/blender/editors/interface/interface.c	2011-02-13 14:16:36 UTC (rev 34824)
@@ -660,7 +660,7 @@
 }
 
 
-void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
+static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
 {
 	uiBut *but;
 	IDProperty *prop;
@@ -919,7 +919,7 @@
 
 }
 
-uiBut *ui_get_valid_link_button(uiBlock *block, uiBut *but, short *mval)
+static uiBut *ui_get_valid_link_button(uiBlock *block, uiBut *but, short *mval)
 {
 	uiBut *bt;
 	

Modified: trunk/blender/source/blender/editors/interface/interface_draw.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_draw.c	2011-02-13 13:55:41 UTC (rev 34823)
+++ trunk/blender/source/blender/editors/interface/interface_draw.c	2011-02-13 14:16:36 UTC (rev 34824)
@@ -381,7 +381,7 @@
 }
 
 /* plain fake antialiased unfilled round rectangle */
-void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad, float asp)
+static void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad, float asp)
 {
 	float color[4], alpha;
 	float raddiff;
@@ -715,7 +715,7 @@
 	uiDrawBox(GL_LINE_LOOP, rect->xmin-1, rect->ymin, rect->xmax+1, rect->ymax+1, 3.0f);
 }
 
-void histogram_draw_one(float r, float g, float b, float alpha, float x, float y, float w, float h, float *data, int res)
+static void histogram_draw_one(float r, float g, float b, float alpha, float x, float y, float w, float h, float *data, int res)
 {
 	int i;
 	
@@ -961,17 +961,17 @@
 	draw_scope_end(&rect, scissor);
 }
 
-float polar_to_x(float center, float diam, float ampli, float angle)
+static float polar_to_x(float center, float diam, float ampli, float angle)
 {
 	return center + diam * ampli * cosf(angle);
 }
 
-float polar_to_y(float center, float diam, float ampli, float angle)
+static float polar_to_y(float center, float diam, float ampli, float angle)
 {
 	return center + diam * ampli * sinf(angle);
 }
 
-void vectorscope_draw_target(float centerx, float centery, float diam, float r, float g, float b)
+static void vectorscope_draw_target(float centerx, float centery, float diam, float r, float g, float b)
 {
 	float y,u,v;
 	float tangle=0.f, tampli;

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c	2011-02-13 13:55:41 UTC (rev 34823)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c	2011-02-13 14:16:36 UTC (rev 34824)
@@ -5467,7 +5467,7 @@
 	return menu->dotowards;
 }
 
-int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu, int UNUSED(topmenu))
+static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu, int UNUSED(topmenu))
 {
 	ARegion *ar;
 	uiBlock *block;

Modified: trunk/blender/source/blender/editors/interface/interface_layout.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_layout.c	2011-02-13 13:55:41 UTC (rev 34823)
+++ trunk/blender/source/blender/editors/interface/interface_layout.c	2011-02-13 14:16:36 UTC (rev 34824)
@@ -1114,7 +1114,7 @@
 	int iconid;
 } CollItemSearch;
 
-int sort_search_items_list(void *a, void *b)
+static int sort_search_items_list(void *a, void *b)
 {
 	CollItemSearch *cis1 = (CollItemSearch *)a;
 	CollItemSearch *cis2 = (CollItemSearch *)b;
@@ -2576,8 +2576,7 @@
 	/* XXX silly trick, interface_templates.c doesn't get linked
 	 * because it's not used by other files in this module? */
 	{
-		void ui_template_fix_linking(void);
-		ui_template_fix_linking();
+		UI_template_fix_linking();
 	}
 }
 

Modified: trunk/blender/source/blender/editors/interface/interface_ops.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_ops.c	2011-02-13 13:55:41 UTC (rev 34823)
+++ trunk/blender/source/blender/editors/interface/interface_ops.c	2011-02-13 14:16:36 UTC (rev 34824)
@@ -177,7 +177,7 @@
 	else return 1;
 }
 
-void UI_OT_eyedropper(wmOperatorType *ot)
+static void UI_OT_eyedropper(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Eyedropper";
@@ -207,7 +207,7 @@
 	return OPERATOR_FINISHED;
 }
 
-void UI_OT_reset_default_theme(wmOperatorType *ot)
+static void UI_OT_reset_default_theme(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Reset to Default Theme";
@@ -247,7 +247,7 @@
 	return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
 }
 
-void UI_OT_copy_data_path_button(wmOperatorType *ot)
+static void UI_OT_copy_data_path_button(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Copy Data Path";
@@ -297,7 +297,7 @@
 	return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
 }
 
-void UI_OT_reset_default_button(wmOperatorType *ot)
+static void UI_OT_reset_default_button(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Reset to Default Value";
@@ -389,7 +389,7 @@
 	return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
 }
 
-void UI_OT_copy_to_selected_button(wmOperatorType *ot)
+static void UI_OT_copy_to_selected_button(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Copy To Selected";
@@ -439,7 +439,7 @@
 	return OPERATOR_FINISHED;
 }
 
-void UI_OT_reports_to_textblock(wmOperatorType *ot)
+static void UI_OT_reports_to_textblock(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Reports to Text Block";

Modified: trunk/blender/source/blender/editors/interface/interface_panel.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_panel.c	2011-02-13 13:55:41 UTC (rev 34823)
+++ trunk/blender/source/blender/editors/interface/interface_panel.c	2011-02-13 14:16:36 UTC (rev 34824)
@@ -309,7 +309,7 @@
 /**************************** drawing *******************************/
 
 /* extern used by previewrender */
-void uiPanelPush(uiBlock *block)
+static void uiPanelPush(uiBlock *block)
 {
 	glPushMatrix(); 
 
@@ -317,14 +317,14 @@
 		glTranslatef((float)block->panel->ofsx, (float)block->panel->ofsy, 0.0);
 }
 
-void uiPanelPop(uiBlock *UNUSED(block))
+static void uiPanelPop(uiBlock *UNUSED(block))
 {
 	glPopMatrix();
 }
 
 /* triangle 'icon' for panel header */
 /* NOTE - this seems to be only used for hiding nodes now */
-void ui_draw_tria_icon(float x, float y, char dir)
+void UI_DrawTriIcon(float x, float y, char dir)
 {
 	if(dir=='h') {
 		ui_draw_anti_tria( x-3,y-5, x-3,y+5, x+7,y );
@@ -335,7 +335,7 @@
 }
 
 /* triangle 'icon' inside rect */
-void ui_draw_tria_rect(rctf *rect, char dir)
+static void ui_draw_tria_rect(rctf *rect, char dir)
 {
 	if(dir=='h') {
 		float half= 0.5f*(rect->ymax - rect->ymin);
@@ -347,7 +347,7 @@
 	}
 }
 
-void ui_draw_anti_x(float x1, float y1, float x2, float y2)
+static void ui_draw_anti_x(float x1, float y1, float x2, float y2)
 {
 
 	/* set antialias line */
@@ -655,7 +655,7 @@
 
 /* this doesnt draw */
 /* returns 1 when it did something */
-int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
+static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
 {
 	uiStyle *style= U.uistyles.first;
 	Panel *pa;

Modified: trunk/blender/source/blender/editors/interface/interface_regions.c

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list