[Bf-blender-cvs] [6ebe0b8cf04] master: Assets: Correct name of own recently added BPY functions

Julian Eisel noreply at git.blender.org
Thu Apr 22 19:29:04 CEST 2021


Commit: 6ebe0b8cf0463771d30c592e6926e591ee773557
Author: Julian Eisel
Date:   Thu Apr 22 19:26:09 2021 +0200
Branches: master
https://developer.blender.org/rB6ebe0b8cf0463771d30c592e6926e591ee773557

Assets: Correct name of own recently added BPY functions

Makes the functions (introduced in 557b3d2762a6) 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`

===================================================================

M	source/blender/makesrna/intern/rna_ID.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 3c641c6ec1a..4fe19493614 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -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");



More information about the Bf-blender-cvs mailing list