From c8058e51ee7b355320e20a068ba00f6628567e98 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 31 May 2022 14:07:15 +1000 Subject: RNA: add macros for EnumPropertyItem layout elements Add the following macros for enums as support for these features wasn't all that obvious and there were some inconsistencies in their use. - RNA_ENUM_ITEM_HEADING(name, description) - RNA_ENUM_ITEM_SEPR - RNA_ENUM_ITEM_SEPR_COLUMN --- source/blender/editors/gpencil/gpencil_interpolate.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'source/blender/editors/gpencil/gpencil_interpolate.c') diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index 8630b7f23d4..0039dbae674 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -1482,8 +1482,8 @@ void GPENCIL_OT_interpolate_sequence(wmOperatorType *ot) * Changes here will likely apply there too. */ static const EnumPropertyItem gpencil_interpolation_type_items[] = { - /* interpolation */ - {0, "", 0, N_("Interpolation"), "Standard transitions between keyframes"}, + /* Interpolation. */ + RNA_ENUM_ITEM_HEADING(N_("Interpolation"), "Standard transitions between keyframes"), {GP_IPO_LINEAR, "LINEAR", ICON_IPO_LINEAR, @@ -1495,13 +1495,10 @@ void GPENCIL_OT_interpolate_sequence(wmOperatorType *ot) "Custom", "Custom interpolation defined using a curve map"}, - /* easing */ - {0, - "", - 0, - N_("Easing (by strength)"), - "Predefined inertial transitions, useful for motion graphics (from least to most " - "''dramatic'')"}, + /* Easing. */ + RNA_ENUM_ITEM_HEADING(N_("Easing (by strength)"), + "Predefined inertial transitions, useful for motion graphics " + "(from least to most \"dramatic\")"), {GP_IPO_SINE, "SINE", ICON_IPO_SINE, @@ -1518,7 +1515,7 @@ void GPENCIL_OT_interpolate_sequence(wmOperatorType *ot) "Circular", "Circular easing (strongest and most dynamic)"}, - {0, "", 0, N_("Dynamic Effects"), "Simple physics-inspired easing effects"}, + RNA_ENUM_ITEM_HEADING(N_("Dynamic Effects"), "Simple physics-inspired easing effects"), {GP_IPO_BACK, "BACK", ICON_IPO_BACK, "Back", "Cubic easing with overshoot and settle"}, {GP_IPO_BOUNCE, "BOUNCE", -- cgit v1.2.3