RNA: expose the pin flag for AnimData and ActionGroup

This commit is contained in:
Wayde Moss
2020-03-29 23:04:32 +11:00
committed by Campbell Barton
parent d8e2cc9f4d
commit 5b8b6b4c1e
2 changed files with 12 additions and 0 deletions

View File

@@ -662,6 +662,12 @@ static void rna_def_action_group(BlenderRNA *brna)
prop, "Expanded in Graph Editor", "Action group is expanded in graph editor");
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
prop = RNA_def_property(srna, "use_pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ADT_CURVES_ALWAYS_VISIBLE);
RNA_def_property_ui_text(prop, "Pin in Graph Editor", "");
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
/* color set */
rna_def_actionbone_group_common(srna, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
}

View File

@@ -1322,6 +1322,12 @@ static void rna_def_animdata(BlenderRNA *brna)
prop, "Use NLA Tweak Mode", "Whether to enable or disable tweak mode in NLA");
RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, "rna_AnimData_update");
prop = RNA_def_property(srna, "use_pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ADT_CURVES_ALWAYS_VISIBLE);
RNA_def_property_ui_text(prop, "Pin in Graph Editor", "");
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
/* Animation Data API */
RNA_api_animdata(srna);
}