diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 14 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_node/space_node.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 20 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ops.c | 3 |
6 files changed, 24 insertions, 25 deletions
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index e5a1cb95f52..2406c1c5e32 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -33,20 +33,20 @@ #include "BKE_context.h" #include "BKE_utildefines.h" -int ed_screen_context(const bContext *C, const bContextDataMember *member, bContextDataResult *result) +int ed_screen_context(const bContext *C, bContextDataMember member, bContextDataResult *result) { bScreen *sc= CTX_wm_screen(C); Scene *scene= sc->scene; Base *base; - if(member == CTX_data_scene) { + if(member == CTX_DATA_SCENE) { CTX_data_pointer_set(result, scene); return 1; } - else if(ELEM(member, CTX_data_selected_objects, &CTX_data_selected_bases)) { + else if(ELEM(member, CTX_DATA_SELECTED_OBJECTS, CTX_DATA_SELECTED_BASES)) { for(base=scene->base.first; base; base=base->next) { if((base->flag & SELECT) && (base->lay & scene->lay)) { - if(member == CTX_data_selected_objects) + if(member == CTX_DATA_SELECTED_OBJECTS) CTX_data_list_add(result, base->object); else CTX_data_list_add(result, base); @@ -55,19 +55,19 @@ int ed_screen_context(const bContext *C, const bContextDataMember *member, bCont return 1; } - else if(member == CTX_data_active_base) { + else if(member == CTX_DATA_ACTIVE_BASE) { if(scene->basact) CTX_data_pointer_set(result, scene->basact); return 1; } - else if(member == CTX_data_active_object) { + else if(member == CTX_DATA_ACTIVE_OBJECT) { if(scene->basact) CTX_data_pointer_set(result, scene->basact->object); return 1; } - else if(member == CTX_data_edit_object) { + else if(member == CTX_DATA_EDIT_OBJECT) { /* convenience for now, 1 object per scene in editmode */ if(scene->obedit) CTX_data_pointer_set(result, scene->obedit); diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index fea46175f8d..862c434e3d4 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -56,7 +56,7 @@ void ed_screen_set(bContext *C, bScreen *sc); void ed_screen_fullarea(bContext *C); /* screen_context.c */ -void ed_screen_context(const bContext *C, const bContextDataMember *member, bContextDataResult *result); +void ed_screen_context(const bContext *C, bContextDataMember member, bContextDataResult *result); #endif /* ED_SCREEN_INTERN_H */ diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 5ca1a54e40e..7929fcff716 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -230,15 +230,15 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn) } } -static int image_context(const bContext *C, const bContextDataMember *member, bContextDataResult *result) +static int image_context(const bContext *C, bContextDataMember member, bContextDataResult *result) { SpaceImage *sima= (SpaceImage*)CTX_wm_space_data(C); - if(member == CTX_data_edit_image) { + if(member == CTX_DATA_EDIT_IMAGE) { CTX_data_pointer_set(result, get_space_image(sima)); return 1; } - else if(member == CTX_data_edit_image_buffer) { + else if(member == CTX_DATA_EDIT_IMAGE_BUFFER) { CTX_data_pointer_set(result, get_space_image_buffer(sima)); return 1; } diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index 659069e321d..7febc1cc8e2 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -273,11 +273,11 @@ static void node_region_listener(ARegion *ar, wmNotifier *wmn) } } -static int node_context(const bContext *C, const bContextDataMember *member, bContextDataResult *result) +static int node_context(const bContext *C, bContextDataMember member, bContextDataResult *result) { SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C); - if(member == CTX_data_selected_nodes) { + if(member == CTX_DATA_SELECTED_NODES) { bNode *node; for(next_node(snode->edittree); (node=next_node(NULL));) { diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index beaeb68e69a..e9602a3fe03 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -382,19 +382,19 @@ static int object_is_libdata(Object *ob) return 0; } -static int view3d_context(const bContext *C, const bContextDataMember *member, bContextDataResult *result) +static int view3d_context(const bContext *C, bContextDataMember member, bContextDataResult *result) { View3D *v3d= CTX_wm_view3d(C); Scene *scene= CTX_data_scene(C); Base *base; if(v3d==NULL) return 0; - - if(ELEM(member, CTX_data_selected_objects, CTX_data_selected_bases)) { + + if(ELEM(member, CTX_DATA_SELECTED_OBJECTS, CTX_DATA_SELECTED_BASES)) { for(base=scene->base.first; base; base=base->next) { if((base->flag & SELECT) && (base->lay & v3d->lay)) { if((base->object->restrictflag & OB_RESTRICT_VIEW)==0) { - if(member == CTX_data_selected_objects) + if(member == CTX_DATA_SELECTED_OBJECTS) CTX_data_list_add(result, base->object); else CTX_data_list_add(result, base); @@ -404,12 +404,12 @@ static int view3d_context(const bContext *C, const bContextDataMember *member, b return 1; } - else if(ELEM(member, CTX_data_selected_editable_objects, CTX_data_selected_editable_bases)) { + else if(ELEM(member, CTX_DATA_SELECTED_EDITABLE_OBJECTS, CTX_DATA_SELECTED_EDITABLE_BASES)) { for(base=scene->base.first; base; base=base->next) { if((base->flag & SELECT) && (base->lay & v3d->lay)) { if((base->object->restrictflag & OB_RESTRICT_VIEW)==0) { if(0==object_is_libdata(base->object)) { - if(member == CTX_data_selected_editable_objects) + if(member == CTX_DATA_SELECTED_EDITABLE_OBJECTS) CTX_data_list_add(result, base->object); else CTX_data_list_add(result, base); @@ -420,11 +420,11 @@ static int view3d_context(const bContext *C, const bContextDataMember *member, b return 1; } - else if(ELEM(member, CTX_data_visible_objects, CTX_data_visible_bases)) { + else if(ELEM(member, CTX_DATA_VISIBLE_OBJECTS, CTX_DATA_VISIBLE_BASES)) { for(base=scene->base.first; base; base=base->next) { if(base->lay & v3d->lay) { if((base->object->restrictflag & OB_RESTRICT_VIEW)==0) { - if(member == CTX_data_visible_objects) + if(member == CTX_DATA_VISIBLE_OBJECTS) CTX_data_list_add(result, base->object); else CTX_data_list_add(result, base); @@ -434,14 +434,14 @@ static int view3d_context(const bContext *C, const bContextDataMember *member, b return 1; } - else if(member == CTX_data_active_base) { + else if(member == CTX_DATA_ACTIVE_BASE) { if(scene->basact && (scene->basact->lay & v3d->lay)) if((scene->basact->object->restrictflag & OB_RESTRICT_VIEW)==0) CTX_data_pointer_set(result, scene->basact); return 1; } - else if(member == CTX_data_active_object) { + else if(member == CTX_DATA_ACTIVE_OBJECT) { if(scene->basact && (scene->basact->lay & v3d->lay)) if((scene->basact->object->restrictflag & OB_RESTRICT_VIEW)==0) CTX_data_pointer_set(result, scene->basact->object); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 795d29ccde1..049c6564429 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -177,8 +177,7 @@ void view3d_keymap(wmWindowManager *wm) RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_wpaint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); /* TODO - this is just while we have no way to load a text datablock */ - km = WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile", PKEY, KM_PRESS, 0, 0); - RNA_string_set(km->ptr, "filename", "test.py"); + RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile", PKEY, KM_PRESS, 0, 0)->ptr, "filename", "test.py"); transform_keymap_for_space(wm, keymap, SPACE_VIEW3D); |