[Bf-blender-cvs] [97f82a2224e] soc-2021-uv-editor-improvements: Tweak to recent liboverride API addition: naming.

Bastien Montagne noreply at git.blender.org
Mon Aug 9 03:24:40 CEST 2021


Commit: 97f82a2224e58b46d915db8d52f9552407c4079c
Author: Bastien Montagne
Date:   Wed Aug 4 12:36:06 2021 +0200
Branches: soc-2021-uv-editor-improvements
https://developer.blender.org/rB97f82a2224e58b46d915db8d52f9552407c4079c

Tweak to recent liboverride API addition: naming.

Rename new API function introduced in recent rB3b0fab6dfaa0 to match our
convention to put the action (verb) at the end of names:
`operations_update`.

Sorry for not catching that during review.

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

M	source/blender/makesrna/intern/rna_ID.c
M	tests/python/bl_blendfile_library_overrides.py

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

diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index e177f211c7f..15704fc2523 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -741,7 +741,7 @@ static void rna_ID_override_template_create(ID *id, ReportList *reports)
   BKE_lib_override_library_template_create(id);
 }
 
-static void rna_ID_override_library_update_operations(ID *id,
+static void rna_ID_override_library_operations_update(ID *id,
                                                       IDOverrideLibrary *UNUSED(override_library),
                                                       Main *bmain,
                                                       ReportList *reports)
@@ -1725,7 +1725,7 @@ static void rna_def_ID_override_library(BlenderRNA *brna)
   rna_def_ID_override_library_properties(brna, prop);
 
   /* Update function. */
-  func = RNA_def_function(srna, "update_operations", "rna_ID_override_library_update_operations");
+  func = RNA_def_function(srna, "operations_update", "rna_ID_override_library_operations_update");
   RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
   RNA_def_function_ui_description(func,
                                   "Update the library override operations based on the "
diff --git a/tests/python/bl_blendfile_library_overrides.py b/tests/python/bl_blendfile_library_overrides.py
index 138c5fd13b5..19f06dc698e 100644
--- a/tests/python/bl_blendfile_library_overrides.py
+++ b/tests/python/bl_blendfile_library_overrides.py
@@ -60,7 +60,7 @@ class TestLibraryOverrides(TestHelper, unittest.TestCase):
         assert(len(local_id.override_library.properties) == 0)
 
         local_id.location.y = 1.0
-        local_id.override_library.update_operations()
+        local_id.override_library.operations_update()
 
         assert(len(local_id.override_library.properties) == 1)
         override_prop = local_id.override_library.properties[0]
@@ -104,7 +104,7 @@ class TestLibraryOverrides(TestHelper, unittest.TestCase):
         assert(local_id.scale.x == 0.5)
         assert(local_id.location.y == 1.0)
 
-        local_id.override_library.update_operations()
+        local_id.override_library.operations_update()
         assert(local_id.scale.x == 1.0)
         assert(local_id.location.y == 1.0)



More information about the Bf-blender-cvs mailing list