GPencil: Make accessible via python to keyframe type
This can be requiered for some add-ons and for some reason this prop was missing in RNA.
This commit is contained in:
parent
9cc0597556
commit
326db1b7cd
|
@ -76,6 +76,35 @@ static EnumPropertyItem rna_enum_gpencil_onion_modes_items[] = {
|
|||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
static const EnumPropertyItem rna_enum_keyframe_type_items[] = {
|
||||
{BEZT_KEYTYPE_KEYFRAME,
|
||||
"KEYFRAME",
|
||||
ICON_KEYTYPE_KEYFRAME_VEC,
|
||||
"Keyframe",
|
||||
"Normal keyframe - e.g. for key poses"},
|
||||
{BEZT_KEYTYPE_BREAKDOWN,
|
||||
"BREAKDOWN",
|
||||
ICON_KEYTYPE_BREAKDOWN_VEC,
|
||||
"Breakdown",
|
||||
"A breakdown pose - e.g. for transitions between key poses"},
|
||||
{BEZT_KEYTYPE_MOVEHOLD,
|
||||
"MOVING_HOLD",
|
||||
ICON_KEYTYPE_MOVING_HOLD_VEC,
|
||||
"Moving Hold",
|
||||
"A keyframe that is part of a moving hold"},
|
||||
{BEZT_KEYTYPE_EXTREME,
|
||||
"EXTREME",
|
||||
ICON_KEYTYPE_EXTREME_VEC,
|
||||
"Extreme",
|
||||
"An 'extreme' pose, or some other purpose as needed"},
|
||||
{BEZT_KEYTYPE_JITTER,
|
||||
"JITTER",
|
||||
ICON_KEYTYPE_JITTER_VEC,
|
||||
"Jitter",
|
||||
"A filler or baked keyframe for keying on ones, or some other purpose as needed"},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
static const EnumPropertyItem rna_enum_onion_keyframe_type_items[] = {
|
||||
{-1, "ALL", ICON_ACTION, "All Types", "Include all Keyframe types"},
|
||||
{BEZT_KEYTYPE_KEYFRAME,
|
||||
|
@ -1324,6 +1353,13 @@ static void rna_def_gpencil_frame(BlenderRNA *brna)
|
|||
RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
|
||||
RNA_def_property_ui_text(prop, "Frame Number", "The frame on which this sketch appears");
|
||||
|
||||
prop = RNA_def_property(srna, "keyframe_type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "key_type");
|
||||
RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
|
||||
RNA_def_property_enum_items(prop, rna_enum_keyframe_type_items);
|
||||
RNA_def_property_ui_text(prop, "Keyframe Type", "Type of keyframe");
|
||||
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
|
||||
|
||||
/* Flags */
|
||||
prop = RNA_def_property(srna, "is_edited", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(
|
||||
|
|
Loading…
Reference in New Issue