diff options
author | Hans Goudey <h.goudey@me.com> | 2020-08-21 22:33:40 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-08-21 22:33:40 +0300 |
commit | a1f54be0426e1fea3a24de9e853e2e802ea3b475 (patch) | |
tree | b6d19b4fdf58e585ab3e24fc3fd4c6f107482f15 /source/blender/editors | |
parent | 53d1f893228f4e79d7ab847b9499432655ce8b5e (diff) |
Cleanup: Remove unused variables
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 3 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 15 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 16 |
3 files changed, 10 insertions, 24 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 22e3fec172a..1fa9ed0b2c0 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1703,8 +1703,7 @@ struct PointerRNA *UI_region_panel_custom_data_under_cursor(const struct bContex void UI_panel_custom_data_set(struct Panel *panel, struct PointerRNA *custom_data); /* Polyinstantiated panels for representing a list of data. */ -struct Panel *UI_panel_add_instanced(struct ScrArea *area, - struct ARegion *region, +struct Panel *UI_panel_add_instanced(struct ARegion *region, struct ListBase *panels, char *panel_idname, int list_index, diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index da7b1da9270..812aa25568a 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -212,8 +212,7 @@ static bool panels_need_realign(ScrArea *area, ARegion *region, Panel **r_panel_ /********* Functions for instanced panels. ***********/ -static Panel *UI_panel_add_instanced_ex(ScrArea *area, - ARegion *region, +static Panel *UI_panel_add_instanced_ex(ARegion *region, ListBase *panels, PanelType *panel_type, int list_index, @@ -230,7 +229,7 @@ static Panel *UI_panel_add_instanced_ex(ScrArea *area, * function to create them, as UI_panel_begin does other things we don't need to do. */ LISTBASE_FOREACH (LinkData *, child, &panel_type->children) { PanelType *child_type = child->data; - UI_panel_add_instanced_ex(area, region, &panel->children, child_type, list_index, custom_data); + UI_panel_add_instanced_ex(region, &panel->children, child_type, list_index, custom_data); } /* Make sure the panel is added to the end of the display-order as well. This is needed for @@ -255,12 +254,8 @@ static Panel *UI_panel_add_instanced_ex(ScrArea *area, * Called in situations where panels need to be added dynamically rather than having only one panel * corresponding to each PanelType. */ -Panel *UI_panel_add_instanced(ScrArea *area, - ARegion *region, - ListBase *panels, - char *panel_idname, - int list_index, - PointerRNA *custom_data) +Panel *UI_panel_add_instanced( + ARegion *region, ListBase *panels, char *panel_idname, int list_index, PointerRNA *custom_data) { ARegionType *region_type = region->type; @@ -272,7 +267,7 @@ Panel *UI_panel_add_instanced(ScrArea *area, return NULL; } - return UI_panel_add_instanced_ex(area, region, panels, panel_type, list_index, custom_data); + return UI_panel_add_instanced_ex(region, panels, panel_type, list_index, custom_data); } /** diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 0e801c8cee2..d0f45e4eb9b 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -1859,7 +1859,6 @@ static void modifier_panel_id(void *md_link, char *r_name) void uiTemplateModifiers(uiLayout *UNUSED(layout), bContext *C) { - ScrArea *sa = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); Object *ob = ED_object_active_context(C); @@ -1883,8 +1882,7 @@ void uiTemplateModifiers(uiLayout *UNUSED(layout), bContext *C) PointerRNA *md_ptr = MEM_mallocN(sizeof(PointerRNA), "panel customdata"); RNA_pointer_create(&ob->id, &RNA_Modifier, md, md_ptr); - Panel *new_panel = UI_panel_add_instanced( - sa, region, ®ion->panels, panel_idname, i, md_ptr); + Panel *new_panel = UI_panel_add_instanced(region, ®ion->panels, panel_idname, i, md_ptr); if (new_panel != NULL) { UI_panel_set_expand_from_list_data(C, new_panel); @@ -2037,7 +2035,6 @@ static void bone_constraint_panel_id(void *md_link, char *r_name) */ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C, bool use_bone_constraints) { - ScrArea *sa = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); Object *ob = ED_object_active_context(C); @@ -2060,8 +2057,7 @@ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C, bool use_bone_ PointerRNA *con_ptr = MEM_mallocN(sizeof(PointerRNA), "panel customdata"); RNA_pointer_create(&ob->id, &RNA_Constraint, con, con_ptr); - Panel *new_panel = UI_panel_add_instanced( - sa, region, ®ion->panels, panel_idname, i, con_ptr); + Panel *new_panel = UI_panel_add_instanced(region, ®ion->panels, panel_idname, i, con_ptr); if (new_panel) { /* Set the list panel functionality function pointers since we don't do it with python. */ @@ -2119,7 +2115,6 @@ static void gpencil_modifier_panel_id(void *md_link, char *r_name) void uiTemplateGpencilModifiers(uiLayout *UNUSED(layout), bContext *C) { - ScrArea *sa = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); Object *ob = ED_object_active_context(C); ListBase *modifiers = &ob->greasepencil_modifiers; @@ -2142,8 +2137,7 @@ void uiTemplateGpencilModifiers(uiLayout *UNUSED(layout), bContext *C) PointerRNA *md_ptr = MEM_mallocN(sizeof(PointerRNA), "panel customdata"); RNA_pointer_create(&ob->id, &RNA_GpencilModifier, md, md_ptr); - Panel *new_panel = UI_panel_add_instanced( - sa, region, ®ion->panels, panel_idname, i, md_ptr); + Panel *new_panel = UI_panel_add_instanced(region, ®ion->panels, panel_idname, i, md_ptr); if (new_panel != NULL) { UI_panel_set_expand_from_list_data(C, new_panel); @@ -2208,7 +2202,6 @@ static void shaderfx_panel_id(void *fx_v, char *r_idname) */ void uiTemplateShaderFx(uiLayout *UNUSED(layout), bContext *C) { - ScrArea *sa = CTX_wm_area(C); ARegion *region = CTX_wm_region(C); Object *ob = ED_object_active_context(C); ListBase *shaderfx = &ob->shader_fx; @@ -2226,8 +2219,7 @@ void uiTemplateShaderFx(uiLayout *UNUSED(layout), bContext *C) PointerRNA *fx_ptr = MEM_mallocN(sizeof(PointerRNA), "panel customdata"); RNA_pointer_create(&ob->id, &RNA_ShaderFx, fx, fx_ptr); - Panel *new_panel = UI_panel_add_instanced( - sa, region, ®ion->panels, panel_idname, i, fx_ptr); + Panel *new_panel = UI_panel_add_instanced(region, ®ion->panels, panel_idname, i, fx_ptr); if (new_panel != NULL) { UI_panel_set_expand_from_list_data(C, new_panel); |