[Bf-blender-cvs] [9333f660d07] master: Docs: note the purpose of UserDef_Runtime.is_dirty

Campbell Barton noreply at git.blender.org
Fri Oct 30 11:02:35 CET 2020


Commit: 9333f660d079a188b21b929d06e318fb52c86904
Author: Campbell Barton
Date:   Fri Oct 30 21:00:43 2020 +1100
Branches: master
https://developer.blender.org/rB9333f660d079a188b21b929d06e318fb52c86904

Docs: note the purpose of UserDef_Runtime.is_dirty

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

M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesrna/intern/rna_userdef.c

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

diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 4a02ac8f429..733b459495d 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -589,6 +589,7 @@ typedef struct WalkNavigation {
 } WalkNavigation;
 
 typedef struct UserDef_Runtime {
+  /** Mark as changed so the preferences are saved on exit. */
   char is_dirty;
   char _pad0[7];
 } UserDef_Runtime;
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 17fe5d90eca..d4ba7e570c6 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -217,9 +217,10 @@ static void rna_userdef_version_get(PointerRNA *ptr, int *value)
   value[2] = userdef->subversionfile;
 }
 
+/** Mark the preferences as being changed so they are saved on exit. */
 #  define USERDEF_TAG_DIRTY rna_userdef_is_dirty_update_impl()
 
-/* Use single function so we can more easily breakpoint it. */
+/** Use single function so we can more easily break-point it. */
 void rna_userdef_is_dirty_update_impl(void)
 {
   /* We can't use 'ptr->data' because this update function



More information about the Bf-blender-cvs mailing list