diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-16 02:44:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-16 02:44:15 +0300 |
commit | ec471a9b1c14ea5dcb855de7e570e27ad70661c5 (patch) | |
tree | ab84e5d466b440a0202ff6271f43484763902f79 /source/blender/editors | |
parent | 419911b1d19ceeb87cd1c0a7b78f0133bee4a6cd (diff) |
DNA: rename SpaceButs -> SpaceProperties
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/armature/pose_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/pose_lib.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 10 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 4 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 2 | ||||
-rw-r--r-- | source/blender/editors/render/render_shading.c | 4 | ||||
-rw-r--r-- | source/blender/editors/render/render_view.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 8 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_user_menu.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 20 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_intern.h | 6 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_texture.c | 14 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 34 |
15 files changed, 58 insertions, 58 deletions
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 8f78aadb067..bdf2b2d572a 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -79,7 +79,7 @@ Object *ED_pose_object_from_context(bContext *C) Object *ob; /* since this call may also be used from the buttons window, we need to check for where to get the object */ - if (sa && sa->spacetype == SPACE_BUTS) { + if (sa && sa->spacetype == SPACE_PROPERTIES) { ob = ED_object_context(C); } else { diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 63f843433d1..711a9b3d64a 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -159,7 +159,7 @@ static Object *get_poselib_object(bContext *C) sa = CTX_wm_area(C); - if (sa && (sa->spacetype == SPACE_BUTS)) + if (sa && (sa->spacetype == SPACE_PROPERTIES)) return ED_object_context(C); else return BKE_object_pose_armature_get(CTX_data_active_object(C)); diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 3154a89da5e..56f8d7cb517 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -95,7 +95,7 @@ bGPdata **ED_gpencil_data_get_pointers_direct(ID *screen_id, ScrArea *sa, Scene switch (sa->spacetype) { /* XXX: Should we reduce reliance on context.gpencil_data for these cases? */ - case SPACE_BUTS: /* properties */ + case SPACE_PROPERTIES: /* properties */ case SPACE_INFO: /* header info (needed after workspaces merge) */ { if (ob && (ob->type == OB_GPENCIL)) { @@ -460,7 +460,7 @@ bool ED_gpencil_stroke_can_use_direct(const ScrArea *sa, const bGPDstroke *gps) /* filter stroke types by flags + spacetype */ if (gps->flag & GP_STROKE_3DSPACE) { /* 3D strokes - only in 3D view */ - return ((sa->spacetype == SPACE_VIEW3D) || (sa->spacetype == SPACE_BUTS)); + return ((sa->spacetype == SPACE_VIEW3D) || (sa->spacetype == SPACE_PROPERTIES)); } else if (gps->flag & GP_STROKE_2DIMAGE) { /* Special "image" strokes - only in Image Editor */ diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 69b43fefdb3..410478fc628 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -124,7 +124,7 @@ static void panel_title_color_get(bool show_background, uchar color[4]) /*********************** space specific code ************************/ /* temporary code to remove all sbuts stuff from panel code */ -/* SpaceButs.align */ +/* SpaceProperties.align */ typedef enum eSpaceButtons_Align { BUT_HORIZONTAL = 0, BUT_VERTICAL = 1, @@ -133,7 +133,7 @@ typedef enum eSpaceButtons_Align { static int panel_aligned(ScrArea *sa, ARegion *ar) { - if (sa->spacetype == SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) + if (sa->spacetype == SPACE_PROPERTIES && ar->regiontype == RGN_TYPE_WINDOW) return BUT_VERTICAL; else if (sa->spacetype == SPACE_USERPREF && ar->regiontype == RGN_TYPE_WINDOW) return BUT_VERTICAL; @@ -189,8 +189,8 @@ static bool panels_need_realign(ScrArea *sa, ARegion *ar, Panel **pa_animate) { *pa_animate = NULL; - if (sa->spacetype == SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) { - SpaceButs *sbuts = sa->spacedata.first; + if (sa->spacetype == SPACE_PROPERTIES && ar->regiontype == RGN_TYPE_WINDOW) { + SpaceProperties *sbuts = sa->spacedata.first; if (sbuts->mainbo != sbuts->mainb) { return true; @@ -2313,7 +2313,7 @@ int ui_handler_panel_region(bContext *C, const wmEvent *event, ARegion *ar, cons ScrArea *sa = CTX_wm_area(C); SpaceLink *sl = sa->spacedata.first; - if (sa->spacetype != SPACE_BUTS) { + if (sa->spacetype != SPACE_PROPERTIES) { if (!(pa->control & UI_PNL_SCALE)) { if (event->type == PADPLUSKEY) sl->blockscale += 0.1; else sl->blockscale -= 0.1; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 0262237a051..df233cd6e41 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -5049,7 +5049,7 @@ void uiTemplateCacheFile(uiLayout *layout, bContext *C, PointerRNA *ptr, const c return; } - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); uiLayout *row = uiLayoutRow(layout, false); uiBlock *block = uiLayoutGetBlock(row); diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 1751e43b973..bea8f8aed2b 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -108,7 +108,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) else { switch (spacetype) { - case SPACE_BUTS: + case SPACE_PROPERTIES: ts = &btheme->tbuts; break; case SPACE_VIEW3D: @@ -779,7 +779,7 @@ void UI_SetTheme(int spacetype, int regionid) else if (regionid) { /* popups */ theme_active = U.themes.first; - theme_spacetype = SPACE_BUTS; + theme_spacetype = SPACE_PROPERTIES; theme_regionid = regionid; } else { diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index e6fd3e5116e..262c4e11ca9 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -622,7 +622,7 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r ID *id = (ID *)idp; ID *parent = (ID *)parentp; MTex *slot = (MTex *)slotp; - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); ShaderPreview *sp = WM_jobs_customdata(wm, sa); rcti newrect; int ok; diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 6f78b9338f5..1600ff9b44d 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -99,9 +99,9 @@ static Object **object_array_for_shading(bContext *C, uint *r_objects_len) { ScrArea *sa = CTX_wm_area(C); - SpaceButs *sbuts = NULL; + SpaceProperties *sbuts = NULL; View3D *v3d = NULL; - if (sa->spacetype == SPACE_BUTS) { + if (sa->spacetype == SPACE_PROPERTIES) { sbuts = sa->spacedata.first; } else if (sa->spacetype == SPACE_VIEW3D) { diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index d002c1da312..3a1959a3585 100644 --- a/source/blender/editors/render/render_view.c +++ b/source/blender/editors/render/render_view.c @@ -60,7 +60,7 @@ static ScrArea *biggest_non_image_area(bContext *C) for (sa = sc->areabase.first; sa; sa = sa->next) { if (sa->winx > 30 && sa->winy > 30) { size = sa->winx * sa->winy; - if (!sa->full && sa->spacetype == SPACE_BUTS) { + if (!sa->full && sa->spacetype == SPACE_PROPERTIES) { if (foundwin == 0 && size > bwmaxsize) { bwmaxsize = size; big = sa; diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 1129bd7b1b9..d2e4366b34e 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -243,7 +243,7 @@ bool ED_operator_action_active(bContext *C) bool ED_operator_buttons_active(bContext *C) { - return ed_spacetype_test(C, SPACE_BUTS); + return ed_spacetype_test(C, SPACE_PROPERTIES); } bool ED_operator_node_active(bContext *C) @@ -3873,7 +3873,7 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws, if ((redraws & (TIME_ALL_ANIM_WIN | TIME_REGION | TIME_ALL_3D_WIN)) || from_anim_edit) return 1; break; - case SPACE_BUTS: + case SPACE_PROPERTIES: if (redraws & TIME_ALL_BUTS_WIN) return 1; break; @@ -4777,7 +4777,7 @@ static bool space_context_cycle_poll(bContext *C) { ScrArea *sa = CTX_wm_area(C); /* sa might be NULL if called out of window bounds */ - return (sa && ELEM(sa->spacetype, SPACE_BUTS, SPACE_USERPREF)); + return (sa && ELEM(sa->spacetype, SPACE_PROPERTIES, SPACE_USERPREF)); } /** @@ -4791,7 +4791,7 @@ static void context_cycle_prop_get( const char *propname; switch (sa->spacetype) { - case SPACE_BUTS: + case SPACE_PROPERTIES: RNA_pointer_create(&screen->id, &RNA_SpaceProperties, sa->spacedata.first, r_ptr); propname = "context"; break; diff --git a/source/blender/editors/screen/screen_user_menu.c b/source/blender/editors/screen/screen_user_menu.c index 1f49eb2d5fc..dfcfd339889 100644 --- a/source/blender/editors/screen/screen_user_menu.c +++ b/source/blender/editors/screen/screen_user_menu.c @@ -68,7 +68,7 @@ bUserMenu **ED_screen_user_menus_find(const bContext *C, uint *r_len) bUserMenu **um_array = MEM_calloc_arrayN(array_len, sizeof(*um_array), __func__); um_array[0] = BKE_blender_user_menu_find(&U.user_menus, sl->spacetype, context); um_array[1] = (sl->spacetype != SPACE_TOPBAR) ? BKE_blender_user_menu_find(&U.user_menus, SPACE_TOPBAR, context) : NULL; - um_array[2] = (sl->spacetype == SPACE_VIEW3D) ? BKE_blender_user_menu_find(&U.user_menus, SPACE_BUTS, context) : NULL; + um_array[2] = (sl->spacetype == SPACE_VIEW3D) ? BKE_blender_user_menu_find(&U.user_menus, SPACE_PROPERTIES, context) : NULL; *r_len = array_len; return um_array; diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 68bc548e31e..f1ee4dd2d48 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -465,7 +465,7 @@ static bool buttons_context_linestyle_pinnable(const bContext *C, ViewLayer *vie wmWindow *window = CTX_wm_window(C); Scene *scene = WM_window_get_active_scene(window); FreestyleConfig *config; - SpaceButs *sbuts; + SpaceProperties *sbuts; /* if Freestyle is disabled in the scene */ if ((scene->r.mode & R_EDGE_FRS) == 0) { @@ -477,7 +477,7 @@ static bool buttons_context_linestyle_pinnable(const bContext *C, ViewLayer *vie return false; } /* if the scene has already been pinned */ - sbuts = CTX_wm_space_buts(C); + sbuts = CTX_wm_space_properties(C); if (sbuts->pinid && sbuts->pinid == &scene->id) { return false; } @@ -489,7 +489,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma { /* Note we don't use CTX_data here, instead we get it from the window. * Otherwise there is a loop reading the context that we are setting. */ - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); wmWindow *window = CTX_wm_window(C); Scene *scene = WM_window_get_active_scene(window); ViewLayer *view_layer = WM_window_get_active_view_layer(window); @@ -619,7 +619,7 @@ static int buttons_shading_new_context(const bContext *C, int flag) return BCONTEXT_RENDER; } -void buttons_context_compute(const bContext *C, SpaceButs *sbuts) +void buttons_context_compute(const bContext *C, SpaceProperties *sbuts) { ButsContextPath *path; PointerRNA *ptr; @@ -712,7 +712,7 @@ const char *buttons_context_dir[] = { int buttons_context(const bContext *C, const char *member, bContextDataResult *result) { - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); ButsContextPath *path = sbuts ? sbuts->path : NULL; if (!path) @@ -991,7 +991,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r static void pin_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2)) { - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); if (sbuts->flag & SB_PIN_CONTEXT) { sbuts->pinid = buttons_context_id_path(C); @@ -1004,7 +1004,7 @@ static void pin_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2)) void buttons_context_draw(const bContext *C, uiLayout *layout) { - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); ButsContextPath *path = sbuts->path; uiLayout *row; uiBlock *block; @@ -1072,7 +1072,7 @@ static bool buttons_header_context_poll(const bContext *C, HeaderType *UNUSED(ht static bool buttons_panel_context_poll(const bContext *C, PanelType *UNUSED(pt)) #endif { - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); return (sbuts->mainb != BCONTEXT_TOOL); } @@ -1092,7 +1092,7 @@ void buttons_context_register(ARegionType *art) ht = MEM_callocN(sizeof(HeaderType), "spacetype buttons context header"); strcpy(ht->idname, "BUTTONS_HT_context"); - ht->space_type = SPACE_BUTS; + ht->space_type = SPACE_PROPERTIES; ht->region_type = art->regionid; ht->poll = buttons_header_context_poll; ht->draw = buttons_header_context_draw; @@ -1113,7 +1113,7 @@ void buttons_context_register(ARegionType *art) ID *buttons_context_id_path(const bContext *C) { - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); ButsContextPath *path = sbuts->path; PointerRNA *ptr; int a; diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h index 55f33797cca..3c81b1e4b51 100644 --- a/source/blender/editors/space_buttons/buttons_intern.h +++ b/source/blender/editors/space_buttons/buttons_intern.h @@ -28,7 +28,7 @@ struct ARegionType; struct ID; -struct SpaceButs; +struct SpaceProperties; struct Tex; struct bContext; struct bContextDataResult; @@ -79,7 +79,7 @@ typedef struct ButsContextTexture { /* internal exports only */ /* buttons_context.c */ -void buttons_context_compute(const struct bContext *C, struct SpaceButs *sbuts); +void buttons_context_compute(const struct bContext *C, struct SpaceProperties *sbuts); int buttons_context(const struct bContext *C, const char *member, struct bContextDataResult *result); void buttons_context_draw(const struct bContext *C, struct uiLayout *layout); void buttons_context_register(struct ARegionType *art); @@ -88,7 +88,7 @@ struct ID *buttons_context_id_path(const struct bContext *C); extern const char *buttons_context_dir[]; /* doc access */ /* buttons_texture.c */ -void buttons_texture_context_compute(const struct bContext *C, struct SpaceButs *sbuts); +void buttons_texture_context_compute(const struct bContext *C, struct SpaceProperties *sbuts); /* buttons_ops.c */ void BUTTONS_OT_file_browse(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index b0ddb35d124..a6e0fe6d174 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -159,7 +159,7 @@ static void buttons_texture_modifier_gpencil_foreach(void *userData, Object *ob, N_("Grease Pencil Modifiers"), RNA_struct_ui_icon(ptr.type), md->name); } -static void buttons_texture_users_from_context(ListBase *users, const bContext *C, SpaceButs *sbuts) +static void buttons_texture_users_from_context(ListBase *users, const bContext *C, SpaceProperties *sbuts) { Scene *scene = NULL; Object *ob = NULL; @@ -265,7 +265,7 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext * } } -void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts) +void buttons_texture_context_compute(const bContext *C, SpaceProperties *sbuts) { /* gather available texture users in context. runs on every draw of * properties editor, before the buttons are created. */ @@ -327,7 +327,7 @@ void buttons_texture_context_compute(const bContext *C, SpaceButs *sbuts) static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg)) { /* callback when selecting a texture user in the menu */ - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL; ButsTextureUser *user = (ButsTextureUser *)user_p; PointerRNA texptr; @@ -369,7 +369,7 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg) static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUSED(arg)) { /* callback when opening texture user selection menu, to create buttons. */ - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); ButsContextTexture *ct = sbuts->texuser; ButsTextureUser *user; uiBlock *block = uiLayoutGetBlock(layout); @@ -414,7 +414,7 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C) /* texture user selection dropdown menu. the available users have been * gathered before drawing in ButsContextTexture, we merely need to * display the current item. */ - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL; uiBlock *block = uiLayoutGetBlock(layout); uiBut *but; @@ -454,7 +454,7 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C) static void template_texture_show(bContext *C, void *data_p, void *prop_p) { - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL; ButsTextureUser *user; @@ -482,7 +482,7 @@ static void template_texture_show(bContext *C, void *data_p, void *prop_p) void uiTemplateTextureShow(uiLayout *layout, bContext *C, PointerRNA *ptr, PropertyRNA *prop) { /* button to quickly show texture in texture tab */ - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL; ButsTextureUser *user; diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 6f59a373b6c..a4277666837 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -53,10 +53,10 @@ static SpaceLink *buttons_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene)) { ARegion *ar; - SpaceButs *sbuts; + SpaceProperties *sbuts; - sbuts = MEM_callocN(sizeof(SpaceButs), "initbuts"); - sbuts->spacetype = SPACE_BUTS; + sbuts = MEM_callocN(sizeof(SpaceProperties), "initbuts"); + sbuts->spacetype = SPACE_PROPERTIES; sbuts->mainb = sbuts->mainbuser = BCONTEXT_OBJECT; @@ -94,7 +94,7 @@ static SpaceLink *buttons_new(const ScrArea *UNUSED(area), const Scene *UNUSED(s /* not spacelink itself */ static void buttons_free(SpaceLink *sl) { - SpaceButs *sbuts = (SpaceButs *) sl; + SpaceProperties *sbuts = (SpaceProperties *) sl; if (sbuts->path) MEM_freeN(sbuts->path); @@ -113,7 +113,7 @@ static void buttons_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa) static SpaceLink *buttons_duplicate(SpaceLink *sl) { - SpaceButs *sbutsn = MEM_dupallocN(sl); + SpaceProperties *sbutsn = MEM_dupallocN(sl); /* clear or remove stuff from old */ sbutsn->path = NULL; @@ -129,11 +129,11 @@ static void buttons_main_region_init(wmWindowManager *wm, ARegion *ar) ED_region_panels_init(wm, ar); - keymap = WM_keymap_ensure(wm->defaultconf, "Property Editor", SPACE_BUTS, 0); + keymap = WM_keymap_ensure(wm->defaultconf, "Property Editor", SPACE_PROPERTIES, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void buttons_main_region_layout_properties(const bContext *C, SpaceButs *sbuts, ARegion *ar) +static void buttons_main_region_layout_properties(const bContext *C, SpaceProperties *sbuts, ARegion *ar) { buttons_context_compute(C, sbuts); @@ -310,7 +310,7 @@ static void buttons_main_region_layout_tool(const bContext *C, ARegion *ar) static void buttons_main_region_layout(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); if (sbuts->mainb == BCONTEXT_TOOL) { buttons_main_region_layout_tool(C, ar); @@ -345,7 +345,7 @@ static void buttons_operatortypes(void) static void buttons_keymap(struct wmKeyConfig *keyconf) { - WM_keymap_ensure(keyconf, "Property Editor", SPACE_BUTS, 0); + WM_keymap_ensure(keyconf, "Property Editor", SPACE_PROPERTIES, 0); } /* add handlers, stuff you only do once or on area/region changes */ @@ -363,7 +363,7 @@ static void buttons_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) static void buttons_header_region_draw(const bContext *C, ARegion *ar) { - SpaceButs *sbuts = CTX_wm_space_buts(C); + SpaceProperties *sbuts = CTX_wm_space_properties(C); /* Needed for RNA to get the good values! */ buttons_context_compute(C, sbuts); @@ -377,14 +377,14 @@ static void buttons_header_region_message_subscribe( bScreen *UNUSED(screen), ScrArea *sa, ARegion *ar, struct wmMsgBus *mbus) { - SpaceButs *sbuts = sa->spacedata.first; + SpaceProperties *sbuts = sa->spacedata.first; wmMsgSubscribeValue msg_sub_value_region_tag_redraw = { .owner = ar, .user_data = ar, .notify = ED_region_do_msg_notify_tag_redraw, }; - /* Don't check for SpaceButs.mainb here, we may toggle between view-layers + /* Don't check for SpaceProperties.mainb here, we may toggle between view-layers * where one has no active object, so that available contexts changes. */ WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw); @@ -403,7 +403,7 @@ static void buttons_header_region_message_subscribe( static void buttons_navigation_bar_region_init(wmWindowManager *wm, ARegion *ar) { - wmKeyMap *keymap = WM_keymap_ensure(wm->defaultconf, "Property Editor", SPACE_BUTS, 0); + wmKeyMap *keymap = WM_keymap_ensure(wm->defaultconf, "Property Editor", SPACE_PROPERTIES, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); ar->flag |= RGN_FLAG_PREFSIZE_OR_HIDDEN; @@ -443,7 +443,7 @@ static void buttons_navigation_bar_region_message_subscribe( * showing that button set, to reduce unnecessary drawing. */ static void buttons_area_redraw(ScrArea *sa, short buttons) { - SpaceButs *sbuts = sa->spacedata.first; + SpaceProperties *sbuts = sa->spacedata.first; /* if the area's current button set is equal to the one to redraw */ if (sbuts->mainb == buttons) @@ -454,7 +454,7 @@ static void buttons_area_redraw(ScrArea *sa, short buttons) static void buttons_area_listener( wmWindow *UNUSED(win), ScrArea *sa, wmNotifier *wmn, Scene *UNUSED(scene)) { - SpaceButs *sbuts = sa->spacedata.first; + SpaceProperties *sbuts = sa->spacedata.first; /* context changes */ switch (wmn->category) { @@ -636,7 +636,7 @@ static void buttons_area_listener( static void buttons_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID *new_id) { - SpaceButs *sbuts = (SpaceButs *)slink; + SpaceProperties *sbuts = (SpaceProperties *)slink; if (sbuts->pinid == old_id) { sbuts->pinid = new_id; @@ -693,7 +693,7 @@ void ED_spacetype_buttons(void) SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype buttons"); ARegionType *art; - st->spaceid = SPACE_BUTS; + st->spaceid = SPACE_PROPERTIES; strncpy(st->name, "Buttons", BKE_ST_MAXNAME); st->new = buttons_new; |