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/space_buttons | |
parent | 419911b1d19ceeb87cd1c0a7b78f0133bee4a6cd (diff) |
DNA: rename SpaceButs -> SpaceProperties
Diffstat (limited to 'source/blender/editors/space_buttons')
4 files changed, 37 insertions, 37 deletions
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; |