46 template<
typename Func>
102 if (loops[i_loop].
v == vertex) {
133 if (loops[i_loop].
v == vertex) {
150 using T = decltype(dummy);
151 blender::bke::pbvh_vertex_color_get<T>(*pbvh, vertex, r_color);
158 using T = decltype(dummy);
159 blender::bke::pbvh_vertex_color_set<T>(*pbvh, vertex, color);
165 const int indices_num,
166 float (*r_colors)[4])
169 using T = decltype(dummy);
170 T *pbvh_colors = static_cast<T *>(pbvh->color_layer->data);
171 for (const int i : IndexRange(indices_num)) {
172 T temp = pbvh_colors[indices[i]];
173 blender::bke::from_float(r_colors[i], pbvh_colors[indices[i]]);
174 blender::bke::to_float(temp, r_colors[i]);
181 const int indices_num,
182 float (*r_colors)[4])
185 using T = decltype(dummy);
186 T *pbvh_colors = static_cast<T *>(pbvh->color_layer->data);
187 for (const int i : IndexRange(indices_num)) {
188 blender::bke::to_float(pbvh_colors[indices[i]], r_colors[i]);
195 const int indices_num,
196 float (*r_colors)[4])
203 using T = decltype(dummy);
204 for (const int i : IndexRange(indices_num)) {
205 blender::bke::pbvh_vertex_color_get<T>(*pbvh, indices[i], r_colors[i]);
Generic geometry attributes built on CustomData.
A BVH for high poly meshes.
#define BLI_assert_unreachable()
MINLINE void srgb_to_linearrgb_v3_v3(float linear[3], const float srgb[3])
void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
void rgba_float_to_uchar(unsigned char r_col[4], const float col_f[4])
MINLINE void linearrgb_to_srgb_v3_v3(float srgb[3], const float linear[3])
MINLINE void mul_v4_fl(float r[4], float f)
MINLINE void add_v4_v4(float r[4], const float a[4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void zero_v4(float r[4])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
Platform independent time functions.
Provides wrapper around system-specific atomic primitives, and some extensions (faked-atomic operatio...
ATTR_WARN_UNUSED_RESULT const BMVert * v
SyclQueue void void * src
ccl_gpu_kernel_postfix int ccl_global int * indices
void to_float(const T &src, float dst[4])
void from_float(const float src[4], T &dst)
static void pbvh_vertex_color_get(const PBVH &pbvh, int vertex, float r_color[4])
void to_static_color_type(const eCustomDataType type, const Func &func)
static void pbvh_vertex_color_set(PBVH &pbvh, int vertex, const float color[4])
void BKE_pbvh_store_colors_vertex(PBVH *pbvh, const int *indices, const int indices_num, float(*r_colors)[4])
void BKE_pbvh_store_colors(PBVH *pbvh, const int *indices, const int indices_num, float(*r_colors)[4])
void BKE_pbvh_swap_colors(PBVH *pbvh, const int *indices, const int indices_num, float(*r_colors)[4])
void BKE_pbvh_vertex_color_set(PBVH *pbvh, int vertex, const float color[4])
void BKE_pbvh_vertex_color_get(const PBVH *pbvh, int vertex, float r_color[4])
const struct MPoly * mpoly
const struct MeshElemMap * pmap
const struct MLoop * mloop
CustomDataLayer * color_layer