Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2019-11-02 12:29:12 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-11-02 12:29:12 +0300
commit9c275e26f99fadf83b5096f87dafce8597fede41 (patch)
tree4e6f33ba871cf1d2dfe87989180e551e3820360d /source
parent9da7a0f8bf1403b96452d58f232f47adbbe0876b (diff)
parent782f36d6a87eb622f6052be8ce49c380a6c78e84 (diff)
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c5
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c4
-rw-r--r--source/blender/editors/include/ED_gpencil.h4
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h9
5 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index af315597e68..36805bc0078 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1128,11 +1128,12 @@ static void gpencil_add_editpoints_vertexdata(GpencilBatchCache *cache,
*/
const bool show_points = (show_sculpt_points) || (is_weight_paint) ||
(GPENCIL_EDIT_MODE(gpd) &&
- (ts->gpencil_selectmode_edit != GP_SELECTMODE_STROKE));
+ ((ts->gpencil_selectmode_edit != GP_SELECTMODE_STROKE) ||
+ (gps->totpoints == 1)));
if (cache->is_dirty) {
if ((obact == ob) && ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
- (v3d->gp_flag & V3D_GP_SHOW_EDIT_LINES)) {
+ (v3d->gp_flag & V3D_GP_SHOW_EDIT_LINES) && (gps->totpoints > 1)) {
/* line of the original stroke */
gpencil_get_edlin_geom(&cache->b_edlin, gps, edit_alpha, hide_select);
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index f29e782c618..bebdcb34326 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -3660,7 +3660,6 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
tGPsdata *p = op->customdata;
ToolSettings *ts = CTX_data_tool_settings(C);
GP_Sculpt_Guide *guide = &p->scene->toolsettings->gp_sculpt.guide;
- tGPspoint *points = (tGPspoint *)p->gpd->runtime.sbuffer;
/* default exit state - pass through to support MMB view nav, etc. */
int estate = OPERATOR_PASS_THROUGH;
@@ -3969,6 +3968,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
int size_after = p->gpd->runtime.sbuffer_used;
/* Last point of the event is always real (not fake). */
+ tGPspoint *points = (tGPspoint *)p->gpd->runtime.sbuffer;
tGPspoint *pt = &points[size_after - 1];
pt->tflag &= ~GP_TPOINT_FAKE;
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index b194d28a8b8..3ca993673d4 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -2530,8 +2530,8 @@ void ED_gpencil_select_toggle_all(bContext *C, int action)
/* Ensure the SBuffer (while drawing stroke) size is enough to save all points of the stroke */
tGPspoint *ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array,
- short *buffer_size,
- short *buffer_used,
+ int *buffer_size,
+ int *buffer_used,
const bool clear)
{
tGPspoint *p = NULL;
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 0ff1b8bb40b..dce0e3931be 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -292,8 +292,8 @@ void ED_gpencil_select_toggle_all(struct bContext *C, int action);
/* Ensure stroke sbuffer size is enough */
struct tGPspoint *ED_gpencil_sbuffer_ensure(struct tGPspoint *buffer_array,
- short *buffer_size,
- short *buffer_used,
+ int *buffer_size,
+ int *buffer_used,
const bool clear);
/* Tag all scene grease pencil object to update. */
void ED_gpencil_tag_scene_gpencil(struct Scene *scene);
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 1435d0a64b4..33dfe66a151 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -447,17 +447,16 @@ typedef struct bGPdata_Runtime {
* - buffer must be initialized before use, but freed after
* whole paint operation is over
*/
- /** Number of elements currently used in cache. */
- short sbuffer_used;
/** Flags for stroke that cache represents. */
short sbuffer_sflag;
+ /** Number of elements currently used in cache. */
+ int sbuffer_used;
/** Number of total elements available in cache. */
- short sbuffer_size;
- char _pad[4];
+ int sbuffer_size;
/** Number of control-points for stroke. */
int tot_cp_points;
- char _pad1_[4];
+ char _pad_[4];
/** Array of control-points for stroke. */
bGPDcontrolpoint *cp_points;
} bGPdata_Runtime;