From c76eed6717bd27c4c3b6a35f2216557a593357d6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 31 Mar 2024 21:31:00 +1100 Subject: [PATCH] Unbreak build WITH_TBB disabled It may be possible to support this case with the non-TBB template, for now keep the build working. --- .../blender/editors/sculpt_paint/grease_pencil_tint.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/sculpt_paint/grease_pencil_tint.cc b/source/blender/editors/sculpt_paint/grease_pencil_tint.cc index 5a89a95b611..2b281c4ae13 100644 --- a/source/blender/editors/sculpt_paint/grease_pencil_tint.cc +++ b/source/blender/editors/sculpt_paint/grease_pencil_tint.cc @@ -104,8 +104,9 @@ void TintOperation::on_stroke_begin(const bContext &C, const InputSample & /*sta screen_positions_per_drawing_.reinitialize(drawings_.size()); - threading::parallel_for_each(drawings_.index_range(), [&](const int drawing_index) { - MutableDrawingInfo drawing_info = drawings_[drawing_index]; + threading::parallel_for_each(drawings_, [&](const MutableDrawingInfo &drawing_info) { + const int drawing_index = (&drawing_info - drawings_.data()); + bke::CurvesGeometry &strokes = drawing_info.drawing.strokes_for_write(); const Layer &layer = *grease_pencil.layers()[drawing_info.layer_index]; @@ -244,8 +245,8 @@ void TintOperation::execute_tint(const bContext &C, const InputSample &extension fill_colors.finish(); }; - threading::parallel_for_each(drawings_.index_range(), [&](const int drawing_index) { - const MutableDrawingInfo &info = drawings_[drawing_index]; + threading::parallel_for_each(drawings_, [&](const MutableDrawingInfo &info) { + const int drawing_index = (&info - drawings_.data()); execute_tint_on_drawing(info.drawing, drawing_index); });