Blender V5.3
BKE_grease_pencil_fills.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include <optional>
12
13#include "BKE_attribute.hh"
14#include "BKE_grease_pencil.hh"
15
17
18std::optional<FillCache> fill_cache_from_fill_ids(const VArray<int> &fill_ids);
19
29
46ShapeData shapes_from_fill_ids(const VArray<int> &fill_ids, int curves_num);
47
48/* Get the next available fill ID. */
50int get_next_available_fill_id(const VArray<int> &fill_ids);
51/* Fill the mutable span with the next available fill IDs. */
52void gather_next_available_fill_ids(const VArray<int> &fill_ids, MutableSpan<int> r_new_fill_ids);
53/* Write to the mutable span the next available fill ids at the indices of the given mask. */
55 const IndexMask &curve_mask,
56 MutableSpan<int> r_new_fill_ids);
57
58IndexMask selected_mask_to_fills(const IndexMask &selected_mask,
60 AttrDomain selection_domain,
61 IndexMaskMemory &memory);
63 const GroupedSpan<int> shapes,
64 IndexMaskMemory &memory);
65void separate_fill_ids(CurvesGeometry &curves, const IndexMask &strokes_to_keep);
66
67} // namespace blender::bke::greasepencil
Low-level operations for grease pencil.
Span< T > as_span() const
IndexMask selected_mask_to_fills(const IndexMask &selected_mask, const CurvesGeometry &curves, AttrDomain selection_domain, IndexMaskMemory &memory)
std::optional< FillCache > fill_cache_from_fill_ids(const VArray< int > &fill_ids)
int get_next_available_fill_id(Span< int > fill_ids)
IndexMask curves_mask_to_shapes(const IndexMask &curve_mask, const GroupedSpan< int > shapes, IndexMaskMemory &memory)
void gather_next_available_fill_ids(const VArray< int > &fill_ids, MutableSpan< int > r_new_fill_ids)
void separate_fill_ids(CurvesGeometry &curves, const IndexMask &strokes_to_keep)
ShapeData shapes_from_fill_ids(const VArray< int > &fill_ids, int curves_num)
const GroupedSpan< int > shapes() const