Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-09-02 22:13:26 +0300
committerHans Goudey <h.goudey@me.com>2020-09-02 22:13:26 +0300
commitba4a2a4c8b827201b18e97d9dd025ef93a4db754 (patch)
treea71d6b72aaf0616ebda671bf4b011880b49bb280 /source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h
parentff7d74235023d0c927c0ad3f4d72d1c5dd41b240 (diff)
UI: Use instanced panel custom data instead of list index
For modifier shortcuts we added a "custom_data" field to panels. This commit uses the same system for accessing the list data that corresponds to each panel. This way the context is only used once and the modifier for each panel can be accessed more easily later. This ends up being mostly a cleanup commit with a few small changes in interface_panel.c. The large changes in the UI functions are due to the fact that the panel custom data is now passed around as a single pointer instead of being created again for every panel. The list_index variable in Panel.runtime is removed as it's now unnecessary. Differential Revision: https://developer.blender.org/D8559
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h
index c85e939b13f..6590c04f03e 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.h
@@ -32,20 +32,15 @@ struct PanelType;
struct uiLayout;
typedef void (*PanelDrawFn)(const bContext *, Panel *);
-void gpencil_modifier_masking_panel_draw(const bContext *C,
- Panel *panel,
- bool use_material,
- bool use_vertex);
+void gpencil_modifier_masking_panel_draw(Panel *panel, bool use_material, bool use_vertex);
-void gpencil_modifier_curve_header_draw(const bContext *C, Panel *panel);
-void gpencil_modifier_curve_panel_draw(const bContext *C, Panel *panel);
+void gpencil_modifier_curve_header_draw(const bContext *UNUSED(C), Panel *panel);
+void gpencil_modifier_curve_panel_draw(const bContext *UNUSED(C), Panel *panel);
void gpencil_modifier_panel_end(struct uiLayout *layout, PointerRNA *ptr);
-void gpencil_modifier_panel_get_property_pointers(const bContext *C,
- struct Panel *panel,
- struct PointerRNA *r_ob_ptr,
- struct PointerRNA *r_ptr);
+struct PointerRNA *gpencil_modifier_panel_get_property_pointers(struct Panel *panel,
+ struct PointerRNA *r_ob_ptr);
PanelType *gpencil_modifier_panel_register(struct ARegionType *region_type,
GpencilModifierType type,