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
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-10-19 21:39:21 +0300
committerAntonioya <blendergit@gmail.com>2018-10-20 10:08:34 +0300
commit541d07045b79cef52bdcf8bd1d90fc60793c9872 (patch)
treec8fcaaf79ce0d3a0cea526338e65d63a6de6048f /source/blender/blenloader
parentb634bf9fb64930e0073c17bc115b6c3436b9a8e2 (diff)
GP: Redesign drawing cache to support particles
Full redesign of the cache system used for drawing strokes and handle derived frame data. Before, the cache was saved in bGPdata and a hash was used to manage several objects with the same datablock. Old design made the use of particles very inefficient and prone to bugs and segment faults, and especially when this was mixed with onion skinning and multiple objects using same datablock. Also, there were some conflicts with the depsgrah logic (the old design was done before despgraph was in place) that made the use of hash not working. The new design saves the data in the object runtime struct and avoid the use of any hash to find the right data. This improves the speed and reduce a lot the complexity of the code, memory allocation, hash overload and adds full support for particles and reused datablocks. The particles can reuse the modifiers and shader effects of the original grease pencil object.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index bae71fba036..3b0d946ba47 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6574,9 +6574,6 @@ static void direct_link_gpencil(FileData *fd, bGPdata *gpd)
}
}
- /* clear drawing cache */
- gpd->runtime.batch_cache_data = NULL;
-
/* materials */
gpd->mat = newdataadr(fd, gpd->mat);
test_pointer_array(fd, (void **)&gpd->mat);
@@ -6590,7 +6587,8 @@ static void direct_link_gpencil(FileData *fd, bGPdata *gpd)
gpl->actframe = newdataadr(fd, gpl->actframe);
- gpl->runtime.derived_data = NULL;
+ gpl->runtime.derived_array = NULL;
+ gpl->runtime.len_derived = 0;
gpl->runtime.icon_id = 0;
for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {