[Bf-blender-cvs] [2e60226f23b] master: Fix undo debug logging not printing all types of undo pushes

Brecht Van Lommel noreply at git.blender.org
Mon Mar 30 20:11:11 CEST 2020


Commit: 2e60226f23b684bff6cd3c2e78e683b911656002
Author: Brecht Van Lommel
Date:   Sat Mar 28 22:12:09 2020 +0100
Branches: master
https://developer.blender.org/rB2e60226f23b684bff6cd3c2e78e683b911656002

Fix undo debug logging not printing all types of undo pushes

Ref D7274

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

M	source/blender/blenkernel/intern/undo_system.c

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

diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c
index 6d484a7b702..b111dee80ad 100644
--- a/source/blender/blenkernel/intern/undo_system.c
+++ b/source/blender/blenkernel/intern/undo_system.c
@@ -464,12 +464,12 @@ UndoStep *BKE_undosys_step_push_init_with_type(UndoStack *ustack,
     }
 
     UndoStep *us = MEM_callocN(ut->step_size, __func__);
-    CLOG_INFO(&LOG, 1, "addr=%p, name='%s', type='%s'", us, name, ut->name);
     if (name != NULL) {
       BLI_strncpy(us->name, name, sizeof(us->name));
     }
     us->type = ut;
     ustack->step_init = us;
+    CLOG_INFO(&LOG, 1, "addr=%p, name='%s', type='%s'", us, us->name, us->type->name);
     ut->step_encode_init(C, us);
     undosys_stack_validate(ustack, false);
     return us;
@@ -552,6 +552,8 @@ bool BKE_undosys_step_push_with_type(UndoStack *ustack,
     us->type = ut;
     /* Initialized, not added yet. */
 
+    CLOG_INFO(&LOG, 1, "addr=%p, name='%s', type='%s'", us, us->name, us->type->name);
+
     if (!undosys_step_encode(C, G_MAIN, ustack, us)) {
       MEM_freeN(us);
       undosys_stack_validate(ustack, true);



More information about the Bf-blender-cvs mailing list