Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-28 20:33:02 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-28 20:33:02 +0400
commit74e4ad20c9e8d19f85aaa2995652e3f65bdfc0c9 (patch)
tree7f20ead7facacb69f02ab9384bcd855598878133 /source/blender/editors/space_logic
parentf4f3a9b08b04077e6e9272e4fdd4cd550b47be02 (diff)
2.5: code cleanup, added CTX_wm_space_* for each space type,
instead of casting everywhere.
Diffstat (limited to 'source/blender/editors/space_logic')
-rw-r--r--source/blender/editors/space_logic/logic_buttons.c7
-rw-r--r--source/blender/editors/space_logic/logic_header.c6
-rw-r--r--source/blender/editors/space_logic/logic_window.c8
-rw-r--r--source/blender/editors/space_logic/space_logic.c6
4 files changed, 14 insertions, 13 deletions
diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c
index db6922f304c..58c1eddb6c1 100644
--- a/source/blender/editors/space_logic/logic_buttons.c
+++ b/source/blender/editors/space_logic/logic_buttons.c
@@ -80,7 +80,7 @@ static void do_logic_panel_events(bContext *C, void *arg, int event)
static void logic_panel_properties(const bContext *C, Panel *pa)
{
-// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+// SpaceLogic *slogic= CTX_wm_space_logic(C);
uiBlock *block;
block= uiLayoutFreeBlock(pa->layout);
@@ -90,7 +90,7 @@ static void logic_panel_properties(const bContext *C, Panel *pa)
static void logic_panel_view_properties(const bContext *C, Panel *pa)
{
- // SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+ // SpaceLogic *slogic= CTX_wm_space_logic(C);
uiBlock *block;
block= uiLayoutFreeBlock(pa->layout);
@@ -101,8 +101,9 @@ static void logic_panel_view_properties(const bContext *C, Panel *pa)
void logic_buttons_register(ARegionType *art)
{
- PanelType *pt;
#if 0
+ PanelType *pt;
+
pt= MEM_callocN(sizeof(PanelType), "spacetype logic panel properties");
strcpy(pt->idname, "LOGIC_PT_properties");
strcpy(pt->label, "Logic Properties");
diff --git a/source/blender/editors/space_logic/logic_header.c b/source/blender/editors/space_logic/logic_header.c
index d0e905728be..9444e3893d1 100644
--- a/source/blender/editors/space_logic/logic_header.c
+++ b/source/blender/editors/space_logic/logic_header.c
@@ -63,12 +63,12 @@
static void do_logic_buttons(bContext *C, void *arg, int event)
{
-// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+// SpaceLogic *slogic= CTX_wm_space_logic(C);
}
static uiBlock *logic_addmenu(bContext *C, ARegion *ar, void *arg_unused)
{
-// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+// SpaceLogic *slogic= CTX_wm_space_logic(C);
uiBlock *block;
short yco= 0, menuwidth=120;
@@ -87,7 +87,7 @@ static uiBlock *logic_addmenu(bContext *C, ARegion *ar, void *arg_unused)
void logic_header_buttons(const bContext *C, ARegion *ar)
{
ScrArea *sa= CTX_wm_area(C);
-// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+// SpaceLogic *slogic= CTX_wm_space_logic(C);
uiBlock *block;
short xco, yco= 3;
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index ab4574d5940..03b4a2b84f4 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -2751,7 +2751,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh
static void do_sensor_menu(bContext *C, void *arg, int event)
{
- SpaceLogic *slogic= (SpaceLogic *)CTX_wm_space_data(C);
+ SpaceLogic *slogic= CTX_wm_space_logic(C);
ID **idar;
Object *ob;
bSensor *sens;
@@ -2800,7 +2800,7 @@ static uiBlock *sensor_menu(bContext *C, ARegion *ar, void *arg_unused)
static void do_controller_menu(bContext *C, void *arg, int event)
{
- SpaceLogic *slogic= (SpaceLogic *)CTX_wm_space_data(C);
+ SpaceLogic *slogic= CTX_wm_space_logic(C);
ID **idar;
Object *ob;
bController *cont;
@@ -2849,7 +2849,7 @@ static uiBlock *controller_menu(bContext *C, ARegion *ar, void *arg_unused)
static void do_actuator_menu(bContext *C, void *arg, int event)
{
- SpaceLogic *slogic= (SpaceLogic *)CTX_wm_space_data(C);
+ SpaceLogic *slogic= CTX_wm_space_logic(C);
ID **idar;
Object *ob;
bActuator *act;
@@ -3011,7 +3011,7 @@ static int is_sensor_linked(uiBlock *block, bSensor *sens)
void logic_buttons(bContext *C, ARegion *ar)
{
- SpaceLogic *slogic= (SpaceLogic *)CTX_wm_space_data(C);
+ SpaceLogic *slogic= CTX_wm_space_logic(C);
Object *ob= CTX_data_active_object(C);
ID **idar;
bSensor *sens;
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index a593cfd1e7f..9f458bd8129 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -188,7 +188,7 @@ void logic_keymap(struct wmWindowManager *wm)
static void logic_refresh(const bContext *C, ScrArea *sa)
{
-// SpaceLogic *slogic= (SpaceImage*)CTX_wm_space_data(C);
+// SpaceLogic *slogic= CTX_wm_space_logic(C);
// Object *obedit= CTX_data_edit_object(C);
}
@@ -215,7 +215,7 @@ static void logic_listener(ARegion *ar, wmNotifier *wmn)
static int logic_context(const bContext *C, const char *member, bContextDataResult *result)
{
-// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+// SpaceLogic *slogic= CTX_wm_space_logic(C);
return 0;
@@ -239,7 +239,7 @@ static void logic_main_area_init(wmWindowManager *wm, ARegion *ar)
static void logic_main_area_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
-// SpaceLogic *slogic= (SpaceLogic*)CTX_wm_space_data(C);
+// SpaceLogic *slogic= CTX_wm_space_logic(C);
View2D *v2d= &ar->v2d;
View2DScrollers *scrollers;
float col[3];