Assets: Correct name of own recently added BPY functions

Makes the functions (introduced in 557b3d2762) follow existing naming
conventions for the API.

Changes:
`bpy.types.ID.mark_asset` to `bpy.types.ID.asset_mark`
`bpy.types.ID.clear_asset` to `bpy.types.ID.asset_clear`
This commit is contained in:
Julian Eisel 2021-04-22 19:26:09 +02:00
parent bbb52a462e
commit 6ebe0b8cf0
1 changed files with 4 additions and 4 deletions

View File

@ -577,7 +577,7 @@ static ID *rna_ID_copy(ID *id, Main *bmain)
return newid;
}
static void rna_ID_mark_asset(ID *id, bContext *C)
static void rna_ID_asset_mark(ID *id, bContext *C)
{
if (ED_asset_mark_id(C, id)) {
WM_main_add_notifier(NC_ID | NA_EDITED, NULL);
@ -585,7 +585,7 @@ static void rna_ID_mark_asset(ID *id, bContext *C)
}
}
static void rna_ID_clear_asset(ID *id)
static void rna_ID_asset_clear(ID *id)
{
if (ED_asset_clear_id(id)) {
WM_main_add_notifier(NC_ID | NA_EDITED, NULL);
@ -1734,14 +1734,14 @@ static void rna_def_ID(BlenderRNA *brna)
parm = RNA_def_pointer(func, "id", "ID", "", "New copy of the ID");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "mark_asset", "rna_ID_mark_asset");
func = RNA_def_function(srna, "asset_mark", "rna_ID_asset_mark");
RNA_def_function_ui_description(
func,
"Enable easier reuse of the data-block through the Asset Browser, with the help of "
"customizable metadata (like previews, descriptions and tags)");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
func = RNA_def_function(srna, "clear_asset", "rna_ID_clear_asset");
func = RNA_def_function(srna, "asset_clear", "rna_ID_asset_clear");
RNA_def_function_ui_description(
func,
"Delete all asset metadata and turn the asset data-block back into a normal data-block");