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:
authorAntonioya <blendergit@gmail.com>2019-01-11 13:00:30 +0300
committerAntonioya <blendergit@gmail.com>2019-01-11 13:00:30 +0300
commit5793a84f1262ce78398320f8518816ff7e62cdd8 (patch)
treeb36b2f7648611b3ed500ccd36d128708971ad2f5 /source
parent191e812f3674d16c42468b9dcb7d7422e7946ec6 (diff)
GP: Count all strokes when use multiedit for VBO size
When use multi frame edition, the initial size of the VBO must be bigger than normal edition because the realloc of VBO is very slow.
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index fa16a00183e..8bcd1e13fe1 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -79,6 +79,7 @@ static void gpencil_calc_vertex(
main_onion && DRW_gpencil_onion_active(gpd) && !playing;
const bool time_remap = BKE_gpencil_has_time_modifiers(ob);
+ const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd);
cache_ob->tot_vertex = 0;
cache_ob->tot_triangles = 0;
@@ -90,9 +91,9 @@ static void gpencil_calc_vertex(
continue;
}
- /* if onion skin need to count all frames of the layer */
- if (is_onion) {
- init_gpf = gpl->actframe;
+ /* if multiedit or onion skin need to count all frames of the layer */
+ if ((is_multiedit) || (is_onion)) {
+ init_gpf = gpl->frames.first;
}
else {
/* verify time modifiers */