[Bf-blender-cvs] [5432109170b] greasepencil-object: Move depsgraph tag after brush creation
Antonio Vazquez
noreply at git.blender.org
Fri Jul 13 10:34:03 CEST 2018
Commit: 5432109170b9e9862c6dab515ade73a222175a3d
Author: Antonio Vazquez
Date: Fri Jul 13 10:33:07 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB5432109170b9e9862c6dab515ade73a222175a3d
Move depsgraph tag after brush creation
If the brush was created, the tag was not working because it was done before the brush was available.
===================================================================
M source/blender/editors/gpencil/gpencil_paint.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index c0dcc4e5fb1..9fdfefab500 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1539,12 +1539,6 @@ static void gp_init_drawing_brush(bContext *C, tGPsdata *p)
Brush *brush;
Scene *scene = CTX_data_scene(C);
ToolSettings *ts = CTX_data_tool_settings(C);
- /* GPXX: Need this update to synchronize brush with draw manager
- * maybe this temp hack can be removed when the new tool system
- * will be in place, but while, we need this to keep drawing working.
- *
- */
- DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
Paint *paint = BKE_brush_get_gpencil_paint(ts);
@@ -1573,6 +1567,13 @@ static void gp_init_drawing_brush(bContext *C, tGPsdata *p)
}
/* use radius of eraser */
p->radius = (short)p->eraser->size;
+
+ /* GPXX: Need this update to synchronize brush with draw manager.
+ * Maybe this update can be removed when the new tool system
+ * will be in place, but while, we need this to keep drawing working.
+ *
+ */
+ DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
}
More information about the Bf-blender-cvs
mailing list