[Bf-blender-cvs] [4c712fd17ea] blender2.8: Fix T56263: Crash when sculpting a GP object with animation
Antonioya
noreply at git.blender.org
Tue Aug 7 14:15:47 CEST 2018
Commit: 4c712fd17eade91d1eac65edae09f39460ae60ea
Author: Antonioya
Date: Tue Aug 7 14:15:41 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB4c712fd17eade91d1eac65edae09f39460ae60ea
Fix T56263: Crash when sculpting a GP object with animation
This is a limitation of the current operator design.
I have added a test to be sure the operator is not initializated while play animations to avoid segment fault.
In the future, we can enable this option again, but it will need a operator redesign.
===================================================================
M source/blender/editors/gpencil/gpencil_brush.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 0fadef55b9d..aed55c15b19 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1814,9 +1814,18 @@ static int gpsculpt_brush_invoke(bContext *C, wmOperator *op, const wmEvent *eve
{
tGP_BrushEditData *gso = NULL;
const bool is_modal = RNA_boolean_get(op->ptr, "wait_for_input");
+ const bool is_playing = ED_screen_animation_playing(CTX_wm_manager(C)) != NULL ? true : false;
bool needs_timer = false;
float brush_rate = 0.0f;
+ /* the operator cannot work while play animation */
+ if (is_playing) {
+ BKE_report(op->reports, RPT_ERROR,
+ "Cannot sculpt while play animation");
+
+ return OPERATOR_CANCELLED;
+ }
+
/* init painting data */
if (!gpsculpt_brush_init(C, op))
return OPERATOR_CANCELLED;
More information about the Bf-blender-cvs
mailing list