[Bf-blender-cvs] [491a9e9ec49] master: Cleanup: Undo code: `poll` function.

Bastien Montagne noreply at git.blender.org
Tue Jan 5 18:21:14 CET 2021


Commit: 491a9e9ec496185887caae319a5e11c48e5c12a5
Author: Bastien Montagne
Date:   Tue Jan 5 17:57:57 2021 +0100
Branches: master
https://developer.blender.org/rB491a9e9ec496185887caae319a5e11c48e5c12a5

Cleanup: Undo code: `poll` function.

Remove obviously outdated comment, and explictely set `poll` to `NULL`
in the one case it is not actually defined (sculpt undo).

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

M	source/blender/editors/sculpt_paint/paint_curve_undo.c
M	source/blender/editors/sculpt_paint/sculpt_undo.c

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

diff --git a/source/blender/editors/sculpt_paint/paint_curve_undo.c b/source/blender/editors/sculpt_paint/paint_curve_undo.c
index a3daef19f11..7ce7e73cbf2 100644
--- a/source/blender/editors/sculpt_paint/paint_curve_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_curve_undo.c
@@ -148,7 +148,6 @@ static void paintcurve_undosys_foreach_ID_ref(UndoStep *us_p,
 void ED_paintcurve_undosys_type(UndoType *ut)
 {
   ut->name = "Paint Curve";
-  /* don't poll for now */
   ut->poll = paintcurve_undosys_poll;
   ut->step_encode_init = paintcurve_undosys_step_encode_init;
   ut->step_encode = paintcurve_undosys_step_encode;
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 9677152cf7e..5bbe18935cc 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -1570,6 +1570,7 @@ void ED_sculpt_undo_geometry_end(struct Object *ob)
 void ED_sculpt_undosys_type(UndoType *ut)
 {
   ut->name = "Sculpt";
+  ut->poll = NULL; /* No poll from context for now. */
   ut->step_encode_init = sculpt_undosys_step_encode_init;
   ut->step_encode = sculpt_undosys_step_encode;
   ut->step_decode = sculpt_undosys_step_decode;



More information about the Bf-blender-cvs mailing list