From 8b7482892b2ecb456be60b42fe1625156d19e954 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 14 Feb 2011 17:55:27 +0000 Subject: made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors. --- source/blender/editors/space_logic/logic_ops.c | 20 ++++++++++---------- source/blender/editors/space_logic/logic_window.c | 12 ++++++------ source/blender/editors/space_logic/space_logic.c | 5 +++-- 3 files changed, 19 insertions(+), 18 deletions(-) (limited to 'source/blender/editors/space_logic') diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index cda2aea23fa..4bcb7c1d2f3 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -39,6 +39,7 @@ #include "BKE_main.h" #include "BKE_sca.h" +#include "ED_logic.h" #include "ED_object.h" #include "ED_screen.h" @@ -52,7 +53,6 @@ #include "logic_intern.h" /* ************* Generic Operator Helpers ************* */ - static int edit_sensor_poll(bContext *C) { PointerRNA ptr= CTX_data_pointer_get_type(C, "sensor", &RNA_Sensor); @@ -247,7 +247,7 @@ static int sensor_remove_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void LOGIC_OT_sensor_remove(wmOperatorType *ot) +static void LOGIC_OT_sensor_remove(wmOperatorType *ot) { ot->name= "Remove Sensor"; ot->description= "Remove a sensor from the active object"; @@ -299,7 +299,7 @@ static int sensor_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void LOGIC_OT_sensor_add(wmOperatorType *ot) +static void LOGIC_OT_sensor_add(wmOperatorType *ot) { PropertyRNA *prop; @@ -350,7 +350,7 @@ static int controller_remove_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void LOGIC_OT_controller_remove(wmOperatorType *ot) +static void LOGIC_OT_controller_remove(wmOperatorType *ot) { ot->name= "Remove Controller"; ot->description= "Remove a controller from the active object"; @@ -416,7 +416,7 @@ static int controller_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void LOGIC_OT_controller_add(wmOperatorType *ot) +static void LOGIC_OT_controller_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Controller"; @@ -464,7 +464,7 @@ static int actuator_remove_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e return OPERATOR_CANCELLED; } -void LOGIC_OT_actuator_remove(wmOperatorType *ot) +static void LOGIC_OT_actuator_remove(wmOperatorType *ot) { ot->name= "Remove Actuator"; ot->description= "Remove a actuator from the active object"; @@ -516,7 +516,7 @@ static int actuator_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void LOGIC_OT_actuator_add(wmOperatorType *ot) +static void LOGIC_OT_actuator_add(wmOperatorType *ot) { PropertyRNA *prop; @@ -572,7 +572,7 @@ static int sensor_move_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event return OPERATOR_CANCELLED; } -void LOGIC_OT_sensor_move(wmOperatorType *ot) +static void LOGIC_OT_sensor_move(wmOperatorType *ot) { /* identifiers */ ot->name= "Move Sensor"; @@ -617,7 +617,7 @@ static int controller_move_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e return OPERATOR_CANCELLED; } -void LOGIC_OT_controller_move(wmOperatorType *ot) +static void LOGIC_OT_controller_move(wmOperatorType *ot) { /* identifiers */ ot->name= "Move Controller"; @@ -662,7 +662,7 @@ static int actuator_move_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve return OPERATOR_CANCELLED; } -void LOGIC_OT_actuator_move(wmOperatorType *ot) +static void LOGIC_OT_actuator_move(wmOperatorType *ot) { /* identifiers */ ot->name= "Move Actuator"; diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index ae533e80610..40206a314e8 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -356,7 +356,7 @@ static void old_sca_move_actuator(bContext *C, void *datav, void *move_up) } } -void do_logic_buts(bContext *C, void *UNUSED(arg), int event) +static void do_logic_buts(bContext *C, void *UNUSED(arg), int event) { Main *bmain= CTX_data_main(C); bSensor *sens; @@ -1786,13 +1786,13 @@ static void change_ipo_actuator(bContext *UNUSED(C), void *arg1_but, void *arg2_ but->retval = B_REDR; } -void update_object_actuator_PID(bContext *UNUSED(C), void *act, void *UNUSED(arg)) +static void update_object_actuator_PID(bContext *UNUSED(C), void *act, void *UNUSED(arg)) { bObjectActuator *oa = act; oa->forcerot[0] = 60.0f*oa->forcerot[1]; } -char *get_state_name(Object *ob, short bit) +static char *get_state_name(Object *ob, short bit) { bController *cont; unsigned int mask; @@ -3480,7 +3480,7 @@ static void draw_sensor_touch(uiLayout *layout, PointerRNA *ptr) uiItemR(layout, ptr, "material", 0, NULL, ICON_NULL); } -void draw_brick_sensor(uiLayout *layout, PointerRNA *ptr, bContext *C) +static void draw_brick_sensor(uiLayout *layout, PointerRNA *ptr, bContext *C) { uiLayout *box; @@ -3600,7 +3600,7 @@ static void draw_controller_state(uiLayout *UNUSED(layout), PointerRNA *UNUSED(p } -void draw_brick_controller(uiLayout *layout, PointerRNA *ptr) +static void draw_brick_controller(uiLayout *layout, PointerRNA *ptr) { uiLayout *box; @@ -4355,7 +4355,7 @@ static void draw_actuator_visibility(uiLayout *layout, PointerRNA *ptr) uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NULL); } -void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C) +static void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C) { uiLayout *box; diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c index a945af502a0..516130aa09b 100644 --- a/source/blender/editors/space_logic/space_logic.c +++ b/source/blender/editors/space_logic/space_logic.c @@ -39,6 +39,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "BIF_gl.h" @@ -169,13 +170,13 @@ static SpaceLink *logic_duplicate(SpaceLink *sl) return (SpaceLink *)slogicn; } -void logic_operatortypes(void) +static void logic_operatortypes(void) { WM_operatortype_append(LOGIC_OT_properties); WM_operatortype_append(LOGIC_OT_links_cut); } -void logic_keymap(struct wmKeyConfig *keyconf) +static void logic_keymap(struct wmKeyConfig *keyconf) { wmKeyMap *keymap= WM_keymap_find(keyconf, "Logic Editor", SPACE_LOGIC, 0); -- cgit v1.2.3