Cleanup: Remove unused variables
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user