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:
authorLukas Tönne <lukas.toenne@gmail.com>2017-08-20 20:50:58 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2017-08-20 20:50:58 +0300
commite3b80d620250b3229359efe7e195fa8e7886f57a (patch)
treec10278a7ee8ee32921ca30791bcaf6925c48f136 /source/blender/editors/hair
parentead00baab1c32bc37b99531498b7af2da1e3ace0 (diff)
Multithreading support for the mesh sampling library.
Samples can be generated either one-by-one using the existing "make_sample" function (which uses a default context), or use the more efficient batch generation functions. These optionally support threading via the task scheduler now.
Diffstat (limited to 'source/blender/editors/hair')
-rw-r--r--source/blender/editors/hair/hair_stroke.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/hair/hair_stroke.c b/source/blender/editors/hair/hair_stroke.c
index c18ef56bf6f..dbf3588aa4f 100644
--- a/source/blender/editors/hair/hair_stroke.c
+++ b/source/blender/editors/hair/hair_stroke.c
@@ -421,7 +421,7 @@ static void grow_hair(BMEditStrands *edit, MeshSample *sample)
BM_mesh_elem_index_ensure(bm, BM_ALL);
}
-static bool hair_add_ray_cb(void *vdata, float ray_start[3], float ray_end[3])
+static bool hair_add_ray_cb(void *vdata, void *UNUSED(thread_ctx), float ray_start[3], float ray_end[3])
{
HairToolData *data = vdata;
ViewContext *vc = &data->vc;
@@ -441,7 +441,7 @@ static bool hair_get_surface_sample(HairToolData *data, MeshSample *sample)
MeshSampleGenerator *gen;
bool ok;
- gen = BKE_mesh_sample_gen_surface_raycast(dm, hair_add_ray_cb, data);
+ gen = BKE_mesh_sample_gen_surface_raycast(dm, NULL, NULL, hair_add_ray_cb, data);
ok = BKE_mesh_sample_generate(gen, sample);
BKE_mesh_sample_free_generator(gen);