126 grease_pencil.
runtime->batch_cache);
127 return (cache && cache->
is_dirty ==
false &&
135 grease_pencil.
runtime->batch_cache);
136 if (cache ==
nullptr) {
137 cache = MEM_new<GreasePencilBatchCache>(__func__);
138 grease_pencil.
runtime->batch_cache = cache;
154 grease_pencil.
runtime->batch_cache);
155 if (cache ==
nullptr) {
184 grease_pencil.
runtime->batch_cache);
203 float asp_normalized = (asp > 1.0f) ? (1.0f / asp) : asp;
227 for (
const int point_i : range) {
246 constexpr float no_active_weight = 666.0f;
250 grease_pencil.
runtime->batch_cache);
262 const char *active_defgroup_name = (active_defgroup ==
nullptr) ?
"" : active_defgroup->
name;
280 int visible_points_num = 0;
281 int total_line_ids_num = 0;
282 int total_points_num = 0;
285 total_points_num +=
curves.points_num();
288 if (total_points_num == 0) {
298 int drawing_start_offset = 0;
300 const Layer &layer = *layers[info.layer_index];
307 object, info.drawing, memory);
313 copy_transformed_positions(positions, range, layer_space_to_object_space, positions_slice);
322 drawing_start_offset +=
curves.points_num();
328 total_line_ids_num += visible_strokes.
size();
330 total_line_ids_num += drawing_visible_points_num;
335 if (layer.is_locked()) {
339 visible_points_num += drawing_visible_points_num;
345 int lines_ibo_index = 0;
350 int points_ibo_index = 0;
353 drawing_start_offset = 0;
355 const Layer *layer = layers[info.layer_index];
361 object, info.drawing, memory);
365 const IndexRange points = points_by_curve[curve_i];
368 for (
const int point : points) {
369 lines_data[lines_ibo_index++] = point + drawing_start_offset;
373 lines_data[lines_ibo_index++] = points.
first() + drawing_start_offset;
380 if (!layer->is_locked()) {
382 const IndexRange points = points_by_curve[curve_i];
383 for (
const int point : points) {
384 points_data[points_ibo_index++] = point + drawing_start_offset;
389 drawing_start_offset +=
curves.points_num();
425 const IndexMask editable_and_selected_curves =
427 object, drawing, layer_index, memory);
431 const int curve_i = point_to_curve_map[point_i];
432 const bool is_selected = editable_and_selected_curves.
contains(curve_i);
434 return is_selected && is_nurbs;
451 const IndexMask selected_editable_strokes =
453 object, drawing, layer_index, memory);
457 selected_editable_strokes,
GrainSize(4096), memory, [&](
const int64_t curve_i) {
465 const int layer_index,
470 object, drawing, layer_index, memory);
472 return visible_strokes;
484 const int layer_index,
487 const float4x4 &layer_space_to_object_space,
490 int *r_drawing_line_start_offset,
491 int *r_total_line_ids_num)
494 object, drawing, layer_index, memory);
503 object, drawing, layer_index, memory);
513 copy_transformed_positions(
514 positions_eval_slice, range, layer_space_to_object_space, positions_eval_slice);
522 *r_drawing_line_start_offset += nurbs_points.
size();
523 *r_total_line_ids_num += nurbs_points.
size();
526 *r_total_line_ids_num += nurbs_curves.
size();
531 const int layer_index,
534 int *r_drawing_line_index,
535 int *r_drawing_line_start_offset)
542 object, drawing, layer_index, memory);
544 const int offset = *r_drawing_line_start_offset;
545 int line_index = *r_drawing_line_index;
548 visible_strokes_for_lines.
foreach_index([&](
const int curve_i) {
549 const IndexRange points = points_by_curve_eval[curve_i];
552 for (
const int point : points) {
553 lines_data[line_index++] = point + offset;
557 lines_data[line_index++] = points.
first() + offset;
563 *r_drawing_line_index = line_index;
564 *r_drawing_line_start_offset +=
curves.evaluated_points_num();
572 int *r_drawing_line_index,
573 int *r_drawing_line_start_offset)
578 object, drawing, layer_index, memory);
583 int line_index = *r_drawing_line_index;
587 const IndexRange points = points_by_curve[curve_i];
590 lines_data[line_index++] = point + *r_drawing_line_start_offset;
595 *r_drawing_line_start_offset += points.
size();
598 *r_drawing_line_index = line_index;
606 int *r_drawing_line_index,
607 int *r_drawing_line_start_offset)
610 object, drawing, layer_index, memory);
615 const int offset = *r_drawing_line_start_offset;
616 int line_index = *r_drawing_line_index;
619 for (
const int point : bezier_points.
index_range()) {
620 lines_data[line_index++] = point + bezier_points.
size() * 0 + offset;
621 lines_data[line_index++] = point + bezier_points.
size() * 1 + offset;
622 lines_data[line_index++] = point + bezier_points.
size() * 2 + offset;
627 *r_drawing_line_index = line_index;
628 *r_drawing_line_start_offset += bezier_points.
size() * 3;
636 int *r_drawing_point_index,
637 int *r_drawing_start_offset)
643 const IndexMask selected_editable_strokes =
645 object, drawing, layer_index, memory);
647 const int offset = *r_drawing_start_offset;
648 int ibo_index = *r_drawing_point_index;
650 selected_editable_strokes.
foreach_index([&](
const int curve_i) {
651 const IndexRange points = points_by_curve[curve_i];
652 for (
const int point : points) {
653 points_data[ibo_index++] = point + offset;
657 *r_drawing_point_index = ibo_index;
658 *r_drawing_start_offset +=
curves.points_num();
666 int *r_drawing_point_index,
667 int *r_drawing_start_offset)
670 object, drawing, layer_index, memory);
675 const int offset = *r_drawing_start_offset;
676 int ibo_index = *r_drawing_point_index;
680 points_data[ibo_index++] = point + offset;
683 *r_drawing_point_index = ibo_index;
684 *r_drawing_start_offset += bezier_points.
size() * 2;
688#define GREASE_PENCIL_EDIT_POINT_SELECTED (1 << 0)
689#define GREASE_PENCIL_EDIT_STROKE_SELECTED (1 << 1)
690#define GREASE_PENCIL_EDIT_MULTIFRAME (1 << 2)
691#define GREASE_PENCIL_EDIT_STROKE_START (1 << 3)
692#define GREASE_PENCIL_EDIT_STROKE_END (1 << 4)
693#define GREASE_PENCIL_EDIT_POINT_DIMMED (1 << 5)
702 grease_pencil.
runtime->batch_cache);
741 int total_points_num = 0;
743 const Layer &layer = *layers[info.layer_index];
745 if (layer.is_locked()) {
750 total_points_num +=
curves.points_num();
753 int total_line_points_num = 0;
756 total_line_points_num +=
curves.evaluated_points_num();
759 int total_bezier_point_num = 0;
763 object, info.drawing, info.layer_index, memory);
765 total_bezier_point_num += bezier_points.
size();
771 object, info.drawing, info.layer_index, memory);
774 total_line_points_num += nurbs_points.
size();
778 total_points_num += total_bezier_point_num * 2;
780 total_line_points_num += total_bezier_point_num * 3;
782 if (total_points_num == 0) {
797 edit_points_selection.fill(0.0f);
798 edit_points_vflag.fill(0);
799 edit_line_selection.fill(0.0f);
801 int visible_points_num = 0;
802 int total_line_ids_num = 0;
803 int drawing_start_offset = 0;
804 int drawing_line_start_offset = 0;
806 const Layer &layer = *layers[info.layer_index];
814 object, info.drawing, info.layer_index, memory);
817 const IndexRange points_eval(drawing_line_start_offset,
curves.evaluated_points_num());
820 if (!layer.is_locked()) {
823 copy_transformed_positions(positions, range, layer_space_to_object_space, positions_slice);
832 copy_transformed_positions(
833 positions_eval, range, layer_space_to_object_space, positions_eval_slice);
837 if (!layer.is_locked()) {
840 for (
const int curve_i :
curves.curves_range()) {
841 const IndexRange points = points_by_curve[curve_i].shift(drawing_start_offset);
846 const IndexMask selected_editable_points =
848 object, info.drawing, info.layer_index, memory);
860 curves.ensure_can_interpolate_to_evaluated();
861 curves.interpolate_to_evaluated(selection_slice.
as_span(), line_selection_slice);
865 drawing_line_start_offset +=
curves.evaluated_points_num();
868 total_line_ids_num += visible_strokes_for_lines.
size();
871 visible_strokes_for_lines);
876 if (layer.is_locked()) {
880 drawing_start_offset +=
curves.points_num();
881 const IndexMask selected_editable_strokes =
883 object, info.drawing, info.layer_index, memory);
887 selected_editable_strokes);
897 layer_space_to_object_space,
900 &drawing_line_start_offset,
901 &total_line_ids_num);
904 object, info.drawing, info.layer_index, memory);
911 bezier_points.
size());
925 copy_transformed_positions(
926 positions_slice_left, range, layer_space_to_object_space, positions_slice_left);
927 copy_transformed_positions(
928 positions_slice_right, range, layer_space_to_object_space, positions_slice_right);
943 drawing_line_start_offset + bezier_points.
size(), bezier_points.
size());
945 drawing_line_start_offset + bezier_points.
size() * 2, bezier_points.
size());
959 copy_transformed_positions(positions_eval_center_slice,
961 layer_space_to_object_space,
962 positions_eval_center_slice);
974 visible_points_num += bezier_points.
size() * 2;
975 drawing_start_offset += bezier_points.
size() * 2;
978 drawing_line_start_offset += bezier_points.
size() * 3;
979 total_line_ids_num += bezier_points.
size() * 3;
982 total_line_ids_num += bezier_points.
size();
989 int lines_ibo_index = 0;
994 int points_ibo_index = 0;
997 drawing_start_offset = 0;
998 drawing_line_start_offset = 0;
1000 const Layer *layer = layers[info.layer_index];
1009 &drawing_line_start_offset);
1011 if (!layer->is_locked()) {
1018 &drawing_line_start_offset);
1025 &drawing_line_start_offset);
1032 &drawing_start_offset);
1039 &drawing_start_offset);
1085 grease_pencil.
runtime->batch_cache);
1087 if (cache->
vbo !=
nullptr) {
1101 int total_verts_num = 0;
1102 int total_triangles_num = 0;
1112 object, info.drawing, memory);
1114 const int num_curves = visible_strokes.
size();
1115 const int verts_start_offsets_size = num_curves;
1116 const int tris_start_offsets_size = num_curves;
1117 Array<int> verts_start_offsets(verts_start_offsets_size);
1118 Array<int> tris_start_offsets(tris_start_offsets_size);
1123 for (
const int curve_i :
curves.curves_range()) {
1124 IndexRange points = points_by_curve[curve_i];
1125 if (visible_strokes.
contains(curve_i)) {
1126 tris_start_offsets[
pos] = t_offset;
1129 if (points.
size() >= 3) {
1130 t_offset += points.
size() - 2;
1138 IndexRange points = points_by_curve[curve_i];
1139 const bool is_cyclic = cyclic[curve_i] && (points.
size() > 2);
1145 verts_start_offsets[
pos] = v_offset;
1147 num_points += points.
size();
1151 total_verts_num += num_points + num_cyclic + num_curves * 2;
1152 total_triangles_num += (num_points + num_cyclic) * 2;
1153 total_triangles_num += info.drawing.triangles().size();
1155 verts_start_offsets_per_visible_drawing.
append(std::move(verts_start_offsets));
1156 tris_start_offsets_per_visible_drawing.
append(std::move(tris_start_offsets));
1176 for (
const int drawing_i : drawings.
index_range()) {
1182 if (
curves.evaluated_points_num() == 0) {
1191 curves.ensure_can_interpolate_to_evaluated();
1225 const Span<int> verts_start_offsets = verts_start_offsets_per_visible_drawing[drawing_i];
1226 const Span<int> tris_start_offsets = tris_start_offsets_per_visible_drawing[drawing_i];
1229 object, info.
drawing, memory);
1231 curves.ensure_evaluated_lengths();
1233 auto populate_point = [&](
IndexRange verts_range,
1247 s_vert.radius =
math::max(radii[point_i], 0.0f) *
1249 s_vert.opacity = opacities[point_i] *
1251 s_vert.point_id = verts_range[idx];
1252 s_vert.stroke_id = verts_range.
first();
1258 rotations[point_i], stroke_point_aspect_ratios[curve_i], stroke_softness[curve_i]);
1259 s_vert.u_stroke = u_stroke;
1262 copy_v4_v4(c_vert.vcol, vertex_colors[point_i]);
1263 copy_v4_v4(c_vert.fcol, stroke_fill_colors[curve_i]);
1264 c_vert.fcol[3] = (int(c_vert.fcol[3] * 10000.0f) * 10.0f) + fill_opacities[curve_i];
1272 const IndexRange points = points_by_curve[curve_i];
1273 const bool is_cyclic = cyclic[curve_i] && (points.
size() > 2);
1274 const int verts_start_offset = verts_start_offsets[
pos];
1275 const int tris_start_offset = tris_start_offsets[
pos];
1276 const int num_verts = 1 + points.
size() + (
is_cyclic ? 1 : 0) + 1;
1280 const float4x2 texture_matrix = texture_matrices[curve_i] * object_space_to_layer_space;
1282 const Span<float> lengths =
curves.evaluated_lengths_for_curve(curve_i, cyclic[curve_i]);
1285 verts_slice.
first().mat = -1;
1288 if (points.
size() >= 3) {
1290 for (
const int3 tri : tris_slice) {
1299 const float u_scale = u_scales[curve_i];
1300 const float u_translation = u_translations[curve_i];
1302 const int idx =
i + 1;
1303 const float u_stroke = u_scale * (
i > 0 ? lengths[
i - 1] : 0.0f) + u_translation;
1304 populate_point(verts_range,
1306 start_caps[curve_i],
1317 const int idx = points.
size() + 1;
1318 const float u = points.
size() > 1 ? lengths[points.
size() - 1] : 0.0f;
1319 const float u_stroke = u_scale * u + u_translation;
1320 populate_point(verts_range,
1322 start_caps[curve_i],
1333 verts_slice.
last().mat = -1;
1338 verts[total_verts_num + 0].mat = -1;
1339 verts[total_verts_num + 1].mat = -1;
1362 grease_pencil.
runtime->batch_cache);
1386 object, info.drawing, memory);
1389 const IndexRange points = points_by_curve[curve_i];
1390 const int point_len = points.
size();
1391 const int point_start = index_len;
1392 const bool is_cyclic = cyclic[curve_i] && (point_len > 2);
1394 index_len += point_len + (
is_cyclic ? 1 : 0) + 1;
1396 index_start_per_curve.
append(point_start);
1398 is_onion_per_curve.
append(info.onion_id != 0);
1401 index_start_per_curve.
append(index_len);
1410 for (const int curve : range) {
1412 const IndexRange offset_range = range_per_curve[curve].drop_back(1);
1415 const IndexRange index_range = offset_range.shift(curve + 1);
1416 if (is_onion_per_curve[curve]) {
1417 for (const int i : offset_range.index_range()) {
1418 indices[offset_range[i]] = gpu::RESTART_INDEX;
1420 if (cyclic_per_curve[curve]) {
1421 indices[offset_range.last()] = gpu::RESTART_INDEX;
1425 for (const int i : offset_range.index_range()) {
1426 indices[offset_range[i]] = index_range[i];
1428 if (cyclic_per_curve[curve]) {
1429 indices[offset_range.last()] = index_range.first();
1432 indices[offset_range.one_after_last()] = gpu::RESTART_INDEX;
1441 cache->is_dirty =
false;
1450 grease_pencil->
runtime->batch_cache);
1451 if (cache ==
nullptr) {
1476 grease_pencil->
runtime->batch_cache =
nullptr;
Low-level operations for curves.
Low-level operations for grease pencil that cannot be defined in the C++ header yet.
@ BKE_GREASEPENCIL_BATCH_DIRTY_ALL
Low-level operations for grease pencil.
#define BLI_assert_unreachable()
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
@ GP_STROKE_CAP_TYPE_ROUND
blender::gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, eGPUBatchFlag owns_flag)
#define GPU_batch_create(primitive_type, vertex_buf, index_buf)
int GPU_batch_vertbuf_add(blender::gpu::Batch *batch, blender::gpu::VertBuf *vertex_buf, bool own_vbo)
#define GPU_BATCH_DISCARD_SAFE(batch)
blender::MutableSpan< uint32_t > GPU_indexbuf_get_data(GPUIndexBufBuilder *)
#define GPU_INDEXBUF_DISCARD_SAFE(elem)
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
blender::gpu::IndexBuf * GPU_indexbuf_build_ex(GPUIndexBufBuilder *builder, uint index_min, uint index_max, bool uses_restart_indices)
blender::gpu::IndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
void GPU_indexbuf_init_ex(GPUIndexBufBuilder *, GPUPrimType, uint index_len, uint vertex_len)
void GPU_indexbuf_add_tri_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3)
void GPU_vertbuf_use(blender::gpu::VertBuf *)
blender::gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
#define GPU_VERTBUF_DISCARD_SAFE(verts)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
uint GPU_vertbuf_get_vertex_len(const blender::gpu::VertBuf *verts)
@ GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
static IndexMask from_predicate(const IndexMask &universe, GrainSize grain_size, IndexMaskMemory &memory, Fn &&predicate)
constexpr int64_t first() const
constexpr int64_t last(const int64_t n=0) const
constexpr int64_t size() const
constexpr IndexRange index_range() const
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr Span< T > as_span() const
constexpr T & first() const
constexpr T & last(const int64_t n=0) const
constexpr Span slice(int64_t start, int64_t size) const
void materialize(MutableSpan< T > r_span) const
static VArray ForContainer(ContainerT container)
void append(const T &value)
IndexRange index_range() const
GAttributeReader lookup_or_default(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type, const void *default_value=nullptr) const
Span< float4x2 > texture_matrices() const
const bke::CurvesGeometry & strokes() const
VArray< float > radii() const
Span< int3 > triangles() const
VArray< ColorGeometry4f > fill_colors() const
VArray< float > opacities() const
float4x4 to_object_space(const Object &object) const
IndexRange index_range() const
bool contains(int64_t query_index) const
void foreach_index(Fn &&fn) const
#define GREASE_PENCIL_EDIT_STROKE_START
#define GREASE_PENCIL_EDIT_STROKE_END
Mesh & DRW_object_get_data_for_drawing(const Object &object)
static bool is_cyclic(const Nurb *nu)
#define GPENCIL_MATERIAL_BUFFER_LEN
#define GP_IS_STROKE_VERTEX_BIT
#define GP_VERTEX_ID_SHIFT
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
void copy(const GVArray &src, GMutableSpan dst, int64_t grain_size=4096)
void gather(const GVArray &src, const IndexMask &indices, GMutableSpan dst, int64_t grain_size=4096)
int64_t count_booleans(const VArray< bool > &varray)
static bool grease_pencil_batch_cache_valid(const GreasePencil &grease_pencil)
static void index_buf_add_points(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory, MutableSpan< uint > points_data, int *r_drawing_point_index, int *r_drawing_start_offset)
static void grease_pencil_cache_add_nurbs(Object &object, const bke::greasepencil::Drawing &drawing, const int layer_index, IndexMaskMemory &memory, const VArray< float > &selected_point, const float4x4 &layer_space_to_object_space, MutableSpan< float3 > edit_line_points, MutableSpan< float > edit_line_selection, int *r_drawing_line_start_offset, int *r_total_line_ids_num)
gpu::Batch * DRW_cache_grease_pencil_get(const Scene *scene, Object *ob)
void DRW_grease_pencil_batch_cache_validate(GreasePencil *grease_pencil)
static const GPUVertFormat * grease_pencil_stroke_format()
static void index_buf_add_bezier_lines(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory, MutableSpan< uint > lines_data, int *r_drawing_line_index, int *r_drawing_line_start_offset)
static void grease_pencil_batch_cache_clear(GreasePencil &grease_pencil)
static void index_buf_add_nurbs_lines(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory, MutableSpan< uint > lines_data, int *r_drawing_line_index, int *r_drawing_line_start_offset)
static IndexMask grease_pencil_get_visible_nurbs_points(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory)
static IndexMask grease_pencil_get_visible_non_nurbs_curves(Object &object, const bke::greasepencil::Drawing &drawing, const int layer_index, IndexMaskMemory &memory)
void DRW_grease_pencil_batch_cache_free(GreasePencil *grease_pencil)
gpu::Batch * DRW_cache_grease_pencil_face_wireframe_get(const Scene *scene, Object *ob)
static GreasePencilBatchCache * grease_pencil_batch_cache_init(GreasePencil &grease_pencil)
static void grease_pencil_edit_batch_ensure(Object &object, const GreasePencil &grease_pencil, const Scene &scene)
void DRW_grease_pencil_batch_cache_dirty_tag(GreasePencil *grease_pencil, int mode)
static void grease_pencil_weight_batch_ensure(Object &object, const GreasePencil &grease_pencil, const Scene &scene)
static VArray< T > attribute_interpolate(const VArray< T > &input, const bke::CurvesGeometry &curves)
static GreasePencilBatchCache * grease_pencil_batch_cache_get(GreasePencil &grease_pencil)
gpu::VertBuf * DRW_cache_grease_pencil_position_buffer_get(const Scene *scene, Object *ob)
gpu::Batch * DRW_cache_grease_pencil_edit_lines_get(const Scene *scene, Object *ob)
static IndexMask grease_pencil_get_visible_nurbs_curves(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory)
static const GPUVertFormat * grease_pencil_color_format()
static void index_buf_add_bezier_line_points(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory, MutableSpan< uint > points_data, int *r_drawing_point_index, int *r_drawing_start_offset)
gpu::Batch * DRW_cache_grease_pencil_weight_lines_get(const Scene *scene, Object *ob)
static bool grease_pencil_batch_cache_is_edit_discarded(GreasePencilBatchCache *cache)
gpu::Batch * DRW_cache_grease_pencil_edit_points_get(const Scene *scene, Object *ob)
gpu::Batch * DRW_cache_grease_pencil_weight_points_get(const Scene *scene, Object *ob)
static void grease_pencil_wire_batch_ensure(Object &object, const GreasePencil &grease_pencil, const Scene &scene)
static void copy_transformed_positions(const Span< float3 > src_positions, const IndexRange range, const float4x4 &transform, MutableSpan< float3 > dst_positions)
static void index_buf_add_line_points(Object &object, const bke::greasepencil::Drawing &drawing, const int layer_index, IndexMaskMemory &memory, MutableSpan< uint > lines_data, int *r_drawing_line_index, int *r_drawing_line_start_offset)
static void grease_pencil_geom_batch_ensure(Object &object, const GreasePencil &grease_pencil, const Scene &scene)
BLI_INLINE int32_t pack_rotation_aspect_hardness(float rot, float asp, float softness)
gpu::VertBuf * DRW_cache_grease_pencil_color_buffer_get(const Scene *scene, Object *ob)
IndexMask retrieve_editable_and_selected_strokes(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory)
IndexMask retrieve_visible_bezier_handle_points(Object &object, const bke::greasepencil::Drawing &drawing, const int layer_index, IndexMaskMemory &memory)
Vector< DrawingInfo > retrieve_visible_drawings(const Scene &scene, const GreasePencil &grease_pencil, const bool do_onion_skinning)
IndexMask retrieve_editable_and_selected_points(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory)
IndexMask retrieve_visible_strokes(Object &object, const bke::greasepencil::Drawing &drawing, IndexMaskMemory &memory)
IndexMask retrieve_editable_strokes(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory)
constexpr uint32_t RESTART_INDEX
void masked_fill(MutableSpan< T > data, const T &value, const IndexMask &mask)
CartesianBasis invert(const CartesianBasis &basis)
T max(const T &a, const T &b)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
int sum_group_sizes(OffsetIndices< int > offsets, const IndexMask &mask)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
MatBase< float, 4, 4 > float4x4
VecBase< float, 4 > float4
VecBase< int32_t, 3 > int3
MatBase< float, 4, 2 > float4x2
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f
VecBase< float, 3 > float3
int vertex_group_active_index
ListBase vertex_group_names
GreasePencilRuntimeHandle * runtime
gpu::IndexBuf * edit_line_indices
gpu::VertBuf * edit_points_vflag
gpu::VertBuf * edit_line_pos
gpu::IndexBuf * edit_points_indices
gpu::VertBuf * edit_line_selection
gpu::VertBuf * edit_points_selection
gpu::VertBuf * edit_points_pos
int32_t packed_asp_hard_rot
const bke::greasepencil::Drawing & drawing