[Bf-blender-cvs] [6fa904765a9] master: Cleanup: Rename Panel * variables from pa to panel
Hans Goudey
noreply at git.blender.org
Sat Apr 4 05:20:41 CEST 2020
Commit: 6fa904765a92e1847f8b28b1062c91dcf37beb52
Author: Hans Goudey
Date: Fri Apr 3 22:20:25 2020 -0500
Branches: master
https://developer.blender.org/rB6fa904765a92e1847f8b28b1062c91dcf37beb52
Cleanup: Rename Panel * variables from pa to panel
===================================================================
M source/blender/blenkernel/BKE_screen.h
M source/blender/blenkernel/intern/screen.c
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/writefile.c
M source/blender/editors/include/UI_interface.h
M source/blender/editors/interface/interface_context_menu.c
M source/blender/editors/interface/interface_intern.h
M source/blender/editors/interface/interface_panel.c
M source/blender/editors/interface/interface_region_hud.c
M source/blender/editors/space_file/file_panels.c
M source/blender/editors/space_graph/graph_buttons.c
M source/blender/editors/space_nla/nla_buttons.c
M source/blender/editors/space_node/node_buttons.c
M source/blender/editors/space_view3d/view3d_buttons.c
M source/blender/editors/uvedit/uvedit_buttons.c
M source/blender/makesrna/intern/rna_ui.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index d70718b4387..c49b6e27bba 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -222,11 +222,11 @@ typedef struct PanelType {
/* verify if the panel should draw or not */
bool (*poll)(const struct bContext *C, struct PanelType *pt);
/* draw header (optional) */
- void (*draw_header)(const struct bContext *C, struct Panel *pa);
+ void (*draw_header)(const struct bContext *C, struct Panel *panel);
/* draw header preset (optional) */
- void (*draw_header_preset)(const struct bContext *C, struct Panel *pa);
+ void (*draw_header_preset)(const struct bContext *C, struct Panel *panel);
/* draw entirely, view changes should be handled here */
- void (*draw)(const struct bContext *C, struct Panel *pa);
+ void (*draw)(const struct bContext *C, struct Panel *panel);
/* sub panels */
struct PanelType *parent;
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 38bd0211d15..997e807a253 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -230,11 +230,11 @@ static void panel_list_copy(ListBase *newlb, const ListBase *lb)
BLI_duplicatelist(newlb, lb);
/* copy panel pointers */
- Panel *newpa = newlb->first;
- Panel *pa = lb->first;
- for (; newpa; newpa = newpa->next, pa = pa->next) {
- newpa->activedata = NULL;
- panel_list_copy(&newpa->children, &pa->children);
+ Panel *new_panel = newlb->first;
+ Panel *panel = lb->first;
+ for (; new_panel; new_panel = new_panel->next, panel = panel->next) {
+ new_panel->activedata = NULL;
+ panel_list_copy(&new_panel->children, &panel->children);
}
}
@@ -418,13 +418,13 @@ void BKE_region_callback_free_gizmomap_set(void (*callback)(struct wmGizmoMap *)
void BKE_area_region_panels_free(ListBase *lb)
{
- Panel *pa, *pa_next;
- for (pa = lb->first; pa; pa = pa_next) {
- pa_next = pa->next;
- if (pa->activedata) {
- MEM_freeN(pa->activedata);
+ Panel *panel, *panel_next;
+ for (panel = lb->first; panel; panel = panel_next) {
+ panel_next = panel->next;
+ if (panel->activedata) {
+ MEM_freeN(panel->activedata);
}
- BKE_area_region_panels_free(&pa->children);
+ BKE_area_region_panels_free(&panel->children);
}
BLI_freelistN(lb);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 84af4d1a3d4..a47c2e3ea13 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7197,11 +7197,11 @@ static void direct_link_panel_list(FileData *fd, ListBase *lb)
{
link_list(fd, lb);
- LISTBASE_FOREACH (Panel *, pa, lb) {
- pa->runtime_flag = 0;
- pa->activedata = NULL;
- pa->type = NULL;
- direct_link_panel_list(fd, &pa->children);
+ LISTBASE_FOREACH (Panel *, panel, lb) {
+ panel->runtime_flag = 0;
+ panel->activedata = NULL;
+ panel->type = NULL;
+ direct_link_panel_list(fd, &panel->children);
}
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index aa8dc39f9c0..f0280c78407 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2943,9 +2943,9 @@ static void write_soops(WriteData *wd, SpaceOutliner *so)
static void write_panel_list(WriteData *wd, ListBase *lb)
{
- LISTBASE_FOREACH (Panel *, pa, lb) {
- writestruct(wd, DATA, Panel, 1, pa);
- write_panel_list(wd, &pa->children);
+ LISTBASE_FOREACH (Panel *, panel, lb) {
+ writestruct(wd, DATA, Panel, 1, panel);
+ write_panel_list(wd, &panel->children);
}
}
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 56f7f0faad7..eb134646649 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -1655,7 +1655,7 @@ struct Panel *UI_panel_begin(struct ScrArea *area,
struct ListBase *lb,
uiBlock *block,
struct PanelType *pt,
- struct Panel *pa,
+ struct Panel *panel,
bool *r_open);
void UI_panel_end(const struct ScrArea *area,
const struct ARegion *region,
@@ -1665,7 +1665,7 @@ void UI_panel_end(const struct ScrArea *area,
bool open);
void UI_panels_scale(struct ARegion *region, float new_width);
void UI_panel_label_offset(struct uiBlock *block, int *r_x, int *r_y);
-int UI_panel_size_y(const struct Panel *pa);
+int UI_panel_size_y(const struct Panel *panel);
bool UI_panel_category_is_visible(const struct ARegion *region);
void UI_panel_category_add(struct ARegion *region, const char *name);
diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c
index 3c5973a3f41..5245b724da4 100644
--- a/source/blender/editors/interface/interface_context_menu.c
+++ b/source/blender/editors/interface/interface_context_menu.c
@@ -1231,7 +1231,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
/**
* menu to show when right clicking on the panel header
*/
-void ui_popup_context_menu_for_panel(bContext *C, ARegion *region, Panel *pa)
+void ui_popup_context_menu_for_panel(bContext *C, ARegion *region, Panel *panel)
{
bScreen *screen = CTX_wm_screen(C);
const bool has_panel_category = UI_panel_category_is_visible(region);
@@ -1243,11 +1243,11 @@ void ui_popup_context_menu_for_panel(bContext *C, ARegion *region, Panel *pa)
if (!any_item_visible) {
return;
}
- if (pa->type->parent != NULL) {
+ if (panel->type->parent != NULL) {
return;
}
- RNA_pointer_create(&screen->id, &RNA_Panel, pa, &ptr);
+ RNA_pointer_create(&screen->id, &RNA_Panel, panel, &ptr);
pup = UI_popup_menu_begin(C, IFACE_("Panel"), ICON_NONE);
layout = UI_popup_menu_layout(pup);
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 4a9c8a1ff54..942f19eb4e9 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -975,7 +975,9 @@ ARegion *ui_screen_region_find_mouse_over(bScreen *screen, const struct wmEvent
/* interface_context_menu.c */
bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but);
-void ui_popup_context_menu_for_panel(struct bContext *C, struct ARegion *region, struct Panel *pa);
+void ui_popup_context_menu_for_panel(struct bContext *C,
+ struct ARegion *region,
+ struct Panel *panel);
/* interface_eyedropper.c */
struct wmKeyMap *eyedropper_modal_keymap(struct wmKeyConfig *keyconf);
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 42179452279..b3854cfc4ae 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -105,8 +105,8 @@ typedef struct uiHandlePanelData {
int startsizex, startsizey;
} uiHandlePanelData;
-static int get_panel_real_size_y(const Panel *pa);
-static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelState state);
+static int get_panel_real_size_y(const Panel *panel);
+static void panel_activate_state(const bContext *C, Panel *panel, uiHandlePanelState state);
static void panel_title_color_get(bool show_background, uchar color[4])
{
@@ -160,45 +160,45 @@ static int panel_aligned(const ScrArea *area, const ARegion *region)
static bool panel_active_animation_changed(ListBase *lb, Panel **pa_animation, bool *no_animation)
{
- LISTBASE_FOREACH (Panel *, pa, lb) {
+ LISTBASE_FOREACH (Panel *, panel, lb) {
/* Detect panel active flag changes. */
- if (!(pa->type && pa->type->parent)) {
- if ((pa->runtime_flag & PNL_WAS_ACTIVE) && !(pa->runtime_flag & PNL_ACTIVE)) {
+ if (!(panel->type && panel->type->parent)) {
+ if ((panel->runtime_flag & PNL_WAS_ACTIVE) && !(panel->runtime_flag & PNL_ACTIVE)) {
return true;
}
- if (!(pa->runtime_flag & PNL_WAS_ACTIVE) && (pa->runtime_flag & PNL_ACTIVE)) {
+ if (!(panel->runtime_flag & PNL_WAS_ACTIVE) && (panel->runtime_flag & PNL_ACTIVE)) {
return true;
}
}
- if ((pa->runtime_flag & PNL_ACTIVE) && !(pa->flag & PNL_CLOSED)) {
- if (panel_active_animation_changed(&pa->children, pa_animation, no_animation)) {
+ if ((panel->runtime_flag & PNL_ACTIVE) && !(panel->flag & PNL_CLOSED)) {
+ if (panel_active_animation_changed(&panel->children, pa_animation, no_animation)) {
return true;
}
}
/* Detect animation. */
- if (pa->activedata) {
- uiHandlePanelData *data = pa->activedata;
+ if (panel->activedata) {
+ uiHandlePanelData *data = panel->activedata;
if (data->state == PANEL_STATE_ANIMATION) {
- *pa_animation = pa;
+ *pa_animation = panel;
}
else {
/* Don't animate while handling other interaction. */
*no_animation = true;
}
}
- if ((pa->runtime_flag & PNL_ANIM_ALIGN) && !(*pa_animation)) {
- *pa_animation = pa;
+ if ((panel->runtime_flag & PNL_ANIM_ALIGN) && !(*pa_animation)) {
+ *pa_animation = panel;
}
}
return false;
}
-static bool panels_need_realign(ScrArea *area, ARegion *region, Panel **r_pa_animate)
+static bool panels_need_realign(ScrArea *area, ARegion *region, Panel **r_panel_animation)
{
- *r_pa_animate = NULL;
+ *r_panel_animation = NULL;
if (area->spacetype == SPACE_PROPERTIES && region->regiontype == RGN_TYPE_WINDOW) {
SpaceProperties *sbuts = area->spacedata.first;
@@ -215,16 +215,16 @@ static bool panels_need_realign(ScrArea *area, ARegion *region, Panel **r_pa_ani
}
/* Detect if a panel was added or removed. */
- Panel *pa_animation = NULL;
+ Pan
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list