diff options
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c index 389f3ca1bd2..a4cdd5c2a69 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c @@ -177,73 +177,70 @@ static int remapTime(struct GpencilModifierData *md, return cfra + offset; } -static void panel_draw(const bContext *C, Panel *panel) +static void panel_draw(const bContext *UNUSED(C), Panel *panel) { uiLayout *row, *col; uiLayout *layout = panel->layout; - PointerRNA ptr; - gpencil_modifier_panel_get_property_pointers(C, panel, NULL, &ptr); + PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL); - int mode = RNA_enum_get(&ptr, "mode"); + int mode = RNA_enum_get(ptr, "mode"); uiLayoutSetPropSep(layout, true); - uiItemR(layout, &ptr, "mode", 0, NULL, ICON_NONE); + uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE); col = uiLayoutColumn(layout, false); const char *text = (mode == GP_TIME_MODE_FIX) ? IFACE_("Frame") : IFACE_("Frame Offset"); - uiItemR(col, &ptr, "offset", 0, text, ICON_NONE); + uiItemR(col, ptr, "offset", 0, text, ICON_NONE); row = uiLayoutRow(col, false); uiLayoutSetActive(row, mode != GP_TIME_MODE_FIX); - uiItemR(row, &ptr, "frame_scale", 0, IFACE_("Scale"), ICON_NONE); + uiItemR(row, ptr, "frame_scale", 0, IFACE_("Scale"), ICON_NONE); row = uiLayoutRow(layout, false); uiLayoutSetActive(row, mode != GP_TIME_MODE_FIX); - uiItemR(row, &ptr, "use_keep_loop", 0, NULL, ICON_NONE); + uiItemR(row, ptr, "use_keep_loop", 0, NULL, ICON_NONE); - gpencil_modifier_panel_end(layout, &ptr); + gpencil_modifier_panel_end(layout, ptr); } -static void custom_range_header_draw(const bContext *C, Panel *panel) +static void custom_range_header_draw(const bContext *UNUSED(C), Panel *panel) { uiLayout *layout = panel->layout; - PointerRNA ptr; - gpencil_modifier_panel_get_property_pointers(C, panel, NULL, &ptr); + PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL); - int mode = RNA_enum_get(&ptr, "mode"); + int mode = RNA_enum_get(ptr, "mode"); uiLayoutSetActive(layout, mode != GP_TIME_MODE_FIX); - uiItemR(layout, &ptr, "use_custom_frame_range", 0, NULL, ICON_NONE); + uiItemR(layout, ptr, "use_custom_frame_range", 0, NULL, ICON_NONE); } -static void custom_range_panel_draw(const bContext *C, Panel *panel) +static void custom_range_panel_draw(const bContext *UNUSED(C), Panel *panel) { uiLayout *col; uiLayout *layout = panel->layout; - PointerRNA ptr; - gpencil_modifier_panel_get_property_pointers(C, panel, NULL, &ptr); + PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL); - int mode = RNA_enum_get(&ptr, "mode"); + int mode = RNA_enum_get(ptr, "mode"); uiLayoutSetPropSep(layout, true); uiLayoutSetActive( - layout, (mode != GP_TIME_MODE_FIX) && (RNA_boolean_get(&ptr, "use_custom_frame_range"))); + layout, (mode != GP_TIME_MODE_FIX) && (RNA_boolean_get(ptr, "use_custom_frame_range"))); col = uiLayoutColumn(layout, false); - uiItemR(col, &ptr, "frame_start", 0, IFACE_("Frame Start"), ICON_NONE); - uiItemR(col, &ptr, "frame_end", 0, IFACE_("End"), ICON_NONE); + uiItemR(col, ptr, "frame_start", 0, IFACE_("Frame Start"), ICON_NONE); + uiItemR(col, ptr, "frame_end", 0, IFACE_("End"), ICON_NONE); } -static void mask_panel_draw(const bContext *C, Panel *panel) +static void mask_panel_draw(const bContext *UNUSED(C), Panel *panel) { - gpencil_modifier_masking_panel_draw(C, panel, false, false); + gpencil_modifier_masking_panel_draw(panel, false, false); } static void panelRegister(ARegionType *region_type) |