23 static float3 colors[9] = {
54 Paint *paint =
nullptr;
55 if (drwctx->
evil_C !=
nullptr) {
63 PBVHFrustumPlanes update_frustum = {
reinterpret_cast<float(*)[4]
>(update_planes), 6};
72 draw_planes[i] = tmat * draw_planes[i];
73 update_planes[i] = draw_planes[i];
86 bool fast_mode =
false;
88 fast_mode = navigating;
95 update_only_visible =
true;
109 const IndexMask nodes_to_update = update_only_visible ? visible_nodes :
124 result_batches[
pos] = {};
125 result_batches[
pos].batch = batches[i];
126 result_batches[
pos].material_slot = material_indices.
is_empty() ? 0 : material_indices[i];
127 result_batches[
pos].debug_index =
pos;
130 return result_batches;
150 if (
const char *name = mesh->active_color_attribute) {
151 if (
const std::optional<bke::AttributeMetaData> meta_data = attributes.lookup_meta_data(
189 for (
uint i = 0; i < 32; i++) {
190 if (cd_needed.
uv & (1 << i)) {
192 CustomDataLayer *layer = layer_i != -1 ? mesh->corner_data.layers + layer_i :
nullptr;
int CustomData_get_layer_index_n(const CustomData *data, eCustomDataType type, int n)
const char * CustomData_get_active_layer_name(const CustomData *data, eCustomDataType type)
Mesh * BKE_object_get_original_mesh(const Object *object)
Paint * BKE_paint_get_active_from_context(const bContext *C)
bool BKE_pbvh_node_fully_hidden_get(const blender::bke::pbvh::Node &node)
bool BKE_pbvh_node_frustum_contain_AABB(const blender::bke::pbvh::Node *node, const PBVHFrustumPlanes *frustum)
@ PAINT_SCULPT_DELAY_UPDATES
constexpr bool is_empty() const
void append(const T &value)
std::unique_ptr< DrawCache > draw_data
virtual Span< int > ensure_material_indices(const Object &object)=0
virtual Span< gpu::Batch * > ensure_lines_batches(const Object &object, const ViewportRequest &request, const IndexMask &nodes_to_update)=0
virtual Span< gpu::Batch * > ensure_tris_batches(const Object &object, const ViewportRequest &request, const IndexMask &nodes_to_update)=0
void foreach_index(Fn &&fn) const
Utilities for rendering attributes.
const DRWContextState * DRW_context_state_get()
const DRWView * DRW_view_default_get()
void DRW_view_frustum_planes_get(const DRWView *view, float planes[6][4])
pbvh::Tree * pbvh_get(Object &object)
IndexMask search_nodes(const Tree &pbvh, IndexMaskMemory &memory, FunctionRef< bool(const Node &)> filter_fn)
void set_frustum_planes(Tree &pbvh, PBVHFrustumPlanes *planes)
IndexMask all_leaf_nodes(const Tree &pbvh, IndexMaskMemory &memory)
void update_normals_from_eval(Object &object_eval, Tree &pbvh)
void get_frustum_planes(const Tree &pbvh, PBVHFrustumPlanes *planes)
DrawCache & ensure_draw_data(std::unique_ptr< bke::pbvh::DrawCache > &ptr)
Vector< SculptBatch > sculpt_batches_get(const Object *ob, SculptBatchFeature features)
static Vector< SculptBatch > sculpt_batches_get_ex(const Object *ob, const bool use_wire, const Span< pbvh::AttributeRequest > attrs)
@ SCULPT_BATCH_VERTEX_COLOR
Vector< SculptBatch > sculpt_batches_per_material_get(const Object *ob, Span< const GPUMaterial * > materials)
void DRW_mesh_get_attributes(const Object &object, const Mesh &mesh, const GPUMaterial *const *gpumat_array, int gpumat_array_len, DRW_Attributes *r_attrs, DRW_MeshCDMask *r_cd_needed)
MatBase< T, NumCol, NumRow > transpose(const MatBase< T, NumRow, NumCol > &mat)
struct SculptSession * sculpt
blender::bke::AttrDomain domain
DRW_AttributeRequest requests[GPU_MAX_ATTR]