56 std::copy_n(corner_normals.
data(), corner_normals.
size(), motion_corner_normals.
data());
72 b_mesh.corner_edges(),
73 b_mesh.vert_to_face_map(),
79 motion_corner_normals);
86 for (
int j = 0; j < 3; j++) {
111 const float motion_scale)
116 mesh->set_motion_steps(3);
124 attr_P->add_motion(mesh);
129 attr_cN->add_motion(mesh);
136 attr_N->add_motion(mesh);
140 const float motion_times[2] = {-1.0f, 1.0f};
142 const float relative_time = motion_times[
step - 1] * 0.5f * motion_scale;
145 for (
int i = 0; i < numverts; i++) {
146 mP[i] =
float3(
P[i]) +
make_float3(b_attr[i][0], b_attr[i][1], b_attr[i][2]) * relative_time;
182 const bool subdivision,
183 const bool need_motion,
184 const float motion_scale)
189 corner_tris = b_mesh.corner_tris();
190 faces = b_mesh.faces();
194 static const ustring u_velocity(
"velocity");
195 const ustring default_color_name{
196 std::string_view(BKE_id_attributes_default_color_name(&b_mesh.
id).value_or(
""))};
199 const ustring name{std::string_view(iter.
name)};
200 const bool is_render_color = name == default_color_name;
202 if (need_motion && name == u_velocity) {
213 if (attributes.
find(name)) {
232 if (is_render_color) {
239 for (
const int i : src.index_range()) {
240 data[i] =
make_uchar4(src[i][0], src[i][1], src[i][2], src[i][3]);
247 src[tri[0]][0], src[tri[0]][1], src[tri[0]][2], src[tri[0]][3]);
249 src[tri[1]][0], src[tri[1]][1], src[tri[1]][2], src[tri[1]][3]);
251 src[tri[2]][0], src[tri[2]][1], src[tri[2]][2], src[tri[2]][3]);
258 using Converter = typename ccl::AttributeConverter<BlenderT>;
259 using CyclesT = typename Converter::CyclesT;
260 if constexpr (!std::is_void_v<CyclesT>) {
261 const blender::VArray<BlenderT> src_varray = b_attr.varray.typed<BlenderT>();
262 const blender::CommonVArrayInfo info = b_attr.varray.common_info();
264 if (info.type == blender::CommonVArrayInfo::Type::Single) {
265 const auto &single_value = *static_cast<const BlenderT *>(info.data);
266 Attribute *attr = attributes.add(name, Converter::type_desc, ATTR_ELEMENT_MESH);
267 if (is_render_color) {
268 attr->std = ATTR_STD_VERTEX_COLOR;
270 CyclesT *data = reinterpret_cast<CyclesT *>(attr->data_for_write());
271 *data = Converter::convert(single_value);
275 const AttributeElement element = blender_domain_to_attr_element(b_attr.domain);
276 if constexpr (Converter::layout_compatible) {
277 if (Attribute::element_size(mesh, element, attributes.prim) == src_varray.size()) {
278 if (info.type == blender::CommonVArrayInfo::Type::Span && b_attr.sharing_info) {
279 Attribute *attr = attributes.add_shared(name,
280 Converter::type_desc,
284 b_attr.sharing_info);
285 if (is_render_color) {
286 attr->std = ATTR_STD_VERTEX_COLOR;
293 Attribute *attr = attributes.add(name, Converter::type_desc, element);
294 if (is_render_color) {
295 attr->std = ATTR_STD_VERTEX_COLOR;
298 CyclesT *data = reinterpret_cast<CyclesT *>(attr->data_for_write());
300 const blender::VArraySpan src = b_attr.varray.typed<BlenderT>();
301 switch (b_attr.domain) {
302 case blender::bke::AttrDomain::Corner: {
304 for (const int i : src.index_range()) {
305 data[i] = Converter::convert(src[i]);
309 for (const int i : corner_tris.index_range()) {
310 const blender::int3 &tri = corner_tris[i];
311 data[i * 3 + 0] = Converter::convert(src[tri[0]]);
312 data[i * 3 + 1] = Converter::convert(src[tri[1]]);
313 data[i * 3 + 2] = Converter::convert(src[tri[2]]);
318 case blender::bke::AttrDomain::Point: {
319 for (const int i : src.index_range()) {
320 data[i] = Converter::convert(src[i]);
324 case blender::bke::AttrDomain::Face: {
326 for (const int i : src.index_range()) {
327 data[i] = Converter::convert(src[i]);
331 for (const int face : faces.index_range()) {
332 const CyclesT value = Converter::convert(src[face]);
333 const blender::IndexRange face_tris = blender::bke::mesh::face_triangles_range(
335 std::fill_n(data + face_tris.start(), face_tris.size(), value);
352 set<ustring> uv_names;
358 uv_names.emplace(std::string_view(iter.
name));
369 const set<ustring> &blender_uv_names)
373 const ustring render_name(std::string_view(b_mesh.default_uv_map_name()));
374 if (blender_uv_names.empty()) {
378 for (
const ustring &uv_name : blender_uv_names) {
379 const bool active_render = uv_name == render_name;
401 fdata[i * 3 + 0] =
make_float2(b_uv_map[tri[0]][0], b_uv_map[tri[0]][1]);
402 fdata[i * 3 + 1] =
make_float2(b_uv_map[tri[1]][0], b_uv_map[tri[1]][1]);
403 fdata[i * 3 + 2] =
make_float2(b_uv_map[tri[2]][0], b_uv_map[tri[2]][1]);
412 const set<ustring> &blender_uv_names)
419 if (blender_uv_names.empty()) {
424 const ustring render_name(std::string_view(b_mesh.default_uv_map_name()));
425 for (
const ustring &uv_name : blender_uv_names) {
426 const bool active_render = uv_name == render_name;
468 for (
const int corner : face) {
469 *(fdata++) =
make_float2(b_uv_map[corner][0], b_uv_map[corner][1]);
485 bool operator()(
const int &vert_idx_a,
const int &vert_idx_b)
489 if (vert_a == vert_b) {
491 return vert_idx_a > vert_idx_b;
493 const float x1 = vert_a.
x + vert_a.
y + vert_a.
z;
494 const float x2 = vert_b.
x + vert_b.
y + vert_b.
z;
508 const int num_verts = positions.
size();
517 for (
int vert_index = 0; vert_index < num_verts; ++vert_index) {
518 sorted_vert_indices[vert_index] = vert_index;
521 sort(sorted_vert_indices.begin(), sorted_vert_indices.end(), compare);
526 for (
int sorted_vert_index = 0; sorted_vert_index < num_verts; ++sorted_vert_index) {
527 const int vert_index = sorted_vert_indices[sorted_vert_index];
530 for (
int other_sorted_vert_index = sorted_vert_index + 1; other_sorted_vert_index < num_verts;
531 ++other_sorted_vert_index)
533 const int other_vert_index = sorted_vert_indices[other_sorted_vert_index];
536 if ((other_vert_co.
x + other_vert_co.
y + other_vert_co.
z) -
537 (vert_co.
x + vert_co.
y + vert_co.
z) >
545 vert_orig_index[vert_index] = other_vert_index;
550 vert_orig_index[vert_index] = vert_index;
554 for (
int vert_index = 0; vert_index < num_verts; ++vert_index) {
555 int orig_index = vert_orig_index[vert_index];
556 while (orig_index != vert_orig_index[orig_index]) {
557 orig_index = vert_orig_index[orig_index];
559 vert_orig_index[vert_index] = orig_index;
567 for (
int vert_index = 0; vert_index < num_verts; ++vert_index) {
568 const float *b_vert_normal = b_vert_normals[vert_index];
569 const int orig_index = vert_orig_index[vert_index];
570 vert_normal[orig_index] +=
make_float3(b_vert_normal[0], b_vert_normal[1], b_vert_normal[2]);
575 for (
int vert_index = 0; vert_index < num_verts; ++vert_index) {
576 const int orig_index = vert_orig_index[vert_index];
577 vert_normal[vert_index] =
normalize(vert_normal[orig_index]);
584 memset(counter.data(), 0,
sizeof(
int) * counter.size());
588 const int v0 = vert_orig_index[b_edge[0]];
589 const int v1 = vert_orig_index[b_edge[1]];
590 if (visited_edges.
exists(v0, v1)) {
593 visited_edges.
insert(v0, v1);
594 const float3 co0 =
make_float3(positions[v0][0], positions[v0][1], positions[v0][2]);
595 const float3 co1 =
make_float3(positions[v1][0], positions[v1][1], positions[v1][2]);
597 edge_accum[v0] += edge;
598 edge_accum[v1] += -edge;
602 for (
int vert_index = 0; vert_index < num_verts; ++vert_index) {
603 const int orig_index = vert_orig_index[vert_index];
604 if (orig_index != vert_index) {
608 if (counter[vert_index] > 0) {
609 const float3 normal = vert_normal[vert_index];
610 const float angle =
safe_acosf(
dot(normal, edge_accum[vert_index] / counter[vert_index]));
614 raw_data[vert_index] = 0.0f;
621 memcpy(data, raw_data.data(),
sizeof(
float) * raw_data.size());
622 memset(counter.data(), 0,
sizeof(
int) * counter.size());
623 visited_edges.
clear();
626 const int v0 = vert_orig_index[b_edge[0]];
627 const int v1 = vert_orig_index[b_edge[1]];
628 if (visited_edges.
exists(v0, v1)) {
631 visited_edges.
insert(v0, v1);
632 data[v0] += raw_data[v1];
633 data[v1] += raw_data[v0];
637 for (
int vert_index = 0; vert_index < num_verts; ++vert_index) {
638 data[vert_index] /= counter[vert_index] + 1;
641 for (
int vert_index = 0; vert_index < num_verts; ++vert_index) {
642 const int orig_index = vert_orig_index[vert_index];
643 data[vert_index] = data[orig_index];
676 vertices_sets.
join(edges[i][0], edges[i][1]);
681 float *data =
attribute->data_for_write<
float>();
687 const int vert = corner_verts[corner_tris[i][0]];
696 const int vert = corner_verts[faces[i].start()];
709 const bool need_motion,
710 const float motion_scale,
711 const bool subdivision =
false)
718 const int numfaces = (!subdivision) ? b_mesh.corner_tris().size() : faces.
size();
721 (mesh->get_subdivision_type() !=
749 attr_P->resize(positions.
size());
752 verts[i] =
make_float3(positions[i][0], positions[i][1], positions[i][2]);
756 if (subdivision || !use_corner_normals) {
760 for (
const int i : vert_normals.index_range()) {
762 make_float3(vert_normals[i][0], vert_normals[i][1], vert_normals[i][2]));
769 const bool need_default_tangent = (subdivision ==
false) && (blender_uv_names.empty()) &&
772 const float (*orco)[3] =
static_cast<const float (*)[3]
>(
778 mesh_texture_space(b_mesh, loc, size);
780 float texspace_location[3];
781 float texspace_size[3];
782 BKE_mesh_texspace_get(
792 madd_v3_v3v3v3(value, texspace_location, orco[i], texspace_size);
795 value = positions[i];
797 generated[i] =
make_float3(value[0], value[1], value[2]) * size - loc;
801 auto clamp_material_index = [&](
const int material_index) ->
int {
802 return clamp(material_index, 0, used_shaders.
size() - 1);
807 int *triangles = mesh->get_triangles().data();
808 bool *
smooth = mesh->get_smooth().data();
809 int *shader = mesh->get_shader().data();
819 const int material_index = clamp_material_index(material_indices[face]);
822 std::fill_n(shader + face_tris.
start(), face_tris.
size(), material_index);
826 std::fill(shader, shader + numtris, 0);
829 if (!sharp_faces.is_empty()) {
831 const bool face_smooth = !sharp_faces[face];
834 std::fill_n(
smooth + face_tris.
start(), face_tris.
size(), face_smooth);
842 if (use_corner_normals) {
849 for (
int j = 0; j < 3; j++) {
850 const int corner = tri[j];
851 const float *normal = b_corner_normals[corner];
857 mesh->tag_triangles_modified();
858 mesh->tag_shader_modified();
859 mesh->tag_smooth_modified();
862 int *subd_start_corner = mesh->get_subd_start_corner().data();
863 int *subd_num_corners = mesh->get_subd_num_corners().data();
864 int *subd_shader = mesh->get_subd_shader().data();
865 bool *subd_smooth = mesh->get_subd_smooth().data();
866 int *subd_ptex_offset = mesh->get_subd_ptex_offset().data();
867 int *subd_face_corners = mesh->get_subd_face_corners().data();
869 if (!sharp_faces.is_empty()) {
870 for (
int i = 0; i < numfaces; i++) {
871 subd_smooth[i] = !sharp_faces[i];
876 std::fill(subd_smooth,
877 subd_smooth + numfaces,
882 for (
int i = 0; i < numfaces; i++) {
883 subd_shader[i] = clamp_material_index(material_indices[i]);
887 std::fill(subd_shader, subd_shader + numfaces, 0);
890 std::copy(corner_verts.
data(), corner_verts.
data() + corner_verts.
size(), subd_face_corners);
897 subd_start_corner[i] = face.
start();
898 subd_num_corners[i] = face.
size();
899 subd_ptex_offset[i] = ptex_offset;
900 const int num_ptex = (face.
size() == 4) ? 1 : face.
size();
901 ptex_offset += num_ptex;
904 mesh->tag_subd_face_corners_modified();
905 mesh->tag_subd_start_corner_modified();
906 mesh->tag_subd_num_corners_modified();
907 mesh->tag_subd_shader_modified();
908 mesh->tag_subd_smooth_modified();
909 mesh->tag_subd_ptex_offset_modified();
937 mesh_texture_space(b_mesh, loc, size);
948 const bool need_motion,
949 const float motion_scale,
950 const float dicing_rate,
951 const int max_subdivisions)
959 create_mesh(scene, mesh, b_mesh, used_shaders, need_motion, motion_scale,
true);
965 size_t num_creases = 0;
967 if (creases[i] != 0.0f) {
976 const float crease = creases[i];
977 if (crease != 0.0f) {
988 if (vert_creases[i] != 0.0f) {
997 switch (subsurf_mod.adaptive_space) {
1006 max(0.1f, subsurf_mod.adaptive_pixel_size * dicing_rate) :
1007 subsurf_mod.adaptive_object_edge_length * dicing_rate;
1009 mesh->set_subd_adaptive_space(space);
1010 mesh->set_subd_dicing_rate(subd_dicing_rate);
1011 mesh->set_subd_max_level(max_subdivisions);
1012 mesh->set_subd_objecttoworld(get_transform(b_ob->object_to_world()));
1021 array<Node *> used_shaders = mesh->get_used_shaders();
1024 new_mesh.set_used_shaders(used_shaders);
1026 if (view_layer.use_surfaces) {
1027 object_subdivision_to_mesh(
1028 *b_ob_info.
real_object, new_mesh, preview, use_adaptive_subdivision);
1033 const bool need_motion = object_need_motion_attribute(b_ob_info, scene);
1034 const float motion_scale = (need_motion) ?
1035 scene->motion_shutter_time() /
1036 (b_scene->r.frs_sec / b_scene->r.frs_sec_base) :
1045 new_mesh.get_used_shaders(),
1055 new_mesh.get_used_shaders(),
1061 free_object_to_mesh(b_ob_info,
const_cast<blender::Mesh &
>(*b_mesh));
1067 new_mesh.set_motion_steps(2);
1071 if (attr_P->has_motion()) {
1073 new_attr_P->take_motion_from(*attr_P);
1076 new_attr_P->add_motion(&new_mesh);
1086 for (
const SocketType &socket : new_mesh.
type->
inputs) {
1088 if (socket.
name ==
"use_motion_blur" || socket.
name ==
"used_shaders") {
1091 mesh->
set_value(socket, new_mesh, socket);
1100 const bool rebuild = (mesh->triangles_is_modified()) || (mesh->subd_num_corners_is_modified()) ||
1101 (mesh->subd_shader_is_modified()) || (mesh->subd_smooth_is_modified()) ||
1102 (mesh->subd_ptex_offset_is_modified()) ||
1103 (mesh->subd_start_corner_is_modified()) ||
1104 (mesh->subd_face_corners_is_modified());
1109void BlenderSync::sync_mesh_motion(
BObjectInfo &b_ob_info,
Mesh *mesh,
const int motion_step)
1112 const size_t numverts = mesh->
num_verts();
1114 if (numverts == 0) {
1121 if (ccl::BKE_object_is_deform_modified(b_ob_info, *b_scene, preview)) {
1123 b_mesh = object_to_mesh(b_ob_info);
1130 const int b_verts_num = b_mesh->
verts_num;
1131 const blender::Span<blender::float3> positions = b_mesh->vert_positions();
1133 free_object_to_mesh(b_ob_info, *
const_cast<blender::Mesh *
>(b_mesh));
1146 bool new_attribute =
false;
1148 if (!attr_P->has_motion()) {
1149 attr_P->add_motion(mesh);
1151 attr_N->add_motion(mesh);
1154 attr_cN->add_motion(mesh);
1157 new_attribute =
true;
1160 const size_t attr_numverts = attr_P->size;
1161 const int attr_step = motion_step + 1;
1166 bool topology_changed = b_verts_num != attr_numverts;
1171 for (
int i = 0; i < std::min<size_t>(b_verts_num, attr_numverts); i++) {
1172 mP[i] =
make_float3(positions[i][0], positions[i][1], positions[i][2]);
1175 const blender::Span<blender::float3> b_vert_normals = b_mesh->vert_normals();
1176 for (
int i = 0; i < std::min<size_t>(b_verts_num, attr_numverts); i++) {
1178 make_float3(b_vert_normals[i][0], b_vert_normals[i][1], b_vert_normals[i][2]));
1182 const blender::Span<blender::float3> b_corner_normals = b_mesh->corner_normals();
1183 const blender::Span<blender::int3> b_corner_tris = b_mesh->corner_tris();
1184 const int mincorners = std::min<int>(b_corner_tris.
size(), numtris);
1186 for (
int i = 0; i < mincorners; i++) {
1188 for (
int j = 0; j < 3; j++) {
1189 const int corner = tri[j];
1190 const float *normal = b_corner_normals[corner];
1195 topology_changed |= b_corner_tris.
size() != numtris;
1197 if (new_attribute) {
1199 if (topology_changed ||
1203 if (topology_changed) {
1204 LOG_WARNING <<
"Topology differs, disabling motion blur for object " << ob_name;
1207 LOG_TRACE <<
"No actual deformation motion for object " << ob_name;
1209 attr_P->remove_motion();
1211 attr_N->remove_motion();
1214 attr_cN->remove_motion();
1217 else if (motion_step > 0) {
1218 LOG_TRACE <<
"Filling deformation motion for object " << ob_name;
1227 if (topology_changed) {
1228 LOG_WARNING <<
"Topology differs, discarding motion blur for object " << ob_name
1229 <<
" at time " << motion_step;
1234 free_object_to_mesh(b_ob_info, *
const_cast<blender::Mesh *
>(b_mesh));
Generic geometry attributes built on CustomData.
CustomData interface, see also DNA_customdata_types.h.
blender::float3 packed_float3
static void attr_create_subd_uv_map(Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, const set< ustring > &blender_uv_names)
static void create_mesh(Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, const array< Node * > &used_shaders, const bool need_motion, const float motion_scale, const bool subdivision=false)
static void attr_create_generic(Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, const bool subdivision, const bool need_motion, const float motion_scale)
static void attr_create_motion_from_velocity(Mesh *mesh, const blender::Mesh &b_mesh, const blender::Span< blender::float3 > b_attr, const float motion_scale)
static bool attr_need_motion_vertex_normals(const blender::Mesh &b_mesh)
static void create_subd_mesh(Scene *scene, Mesh *mesh, BObjectInfo &b_ob_info, const blender::Mesh &b_mesh, const array< Node * > &used_shaders, const bool need_motion, const float motion_scale, const float dicing_rate, const int max_subdivisions)
static CCL_NAMESPACE_BEGIN void attr_create_motion_corner_normals(const blender::Mesh &b_mesh, const blender::Span< blender::float3 > positions, packed_normal *N)
static set< ustring > get_blender_uv_names(const blender::Mesh &b_mesh)
static void attr_create_random_per_island(Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, bool subdivision)
static void attr_create_pointiness(Mesh *mesh, const blender::Span< blender::float3 > positions, const blender::Span< blender::float3 > b_vert_normals, const blender::Span< blender::int2 > edges, bool subdivision)
static AttributeElement blender_domain_to_attr_element(const blender::bke::AttrDomain b_domain)
static void attr_create_motion_vertex_normals(const blender::Mesh &b_mesh, packed_normal *N)
static void attr_create_uv_map(Scene *scene, Mesh *mesh, const blender::Mesh &b_mesh, const set< ustring > &blender_uv_names)
void sort(btMatrix3x3 &U, btVector3 &sigma, btMatrix3x3 &V, int t)
Helper function of 3X3 SVD for sorting singular values.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
void update(AttributeSet &&new_attributes)
Attribute * find(ustring name) const
Attribute * add(ustring name, const TypeDesc type, AttributeElement element)
Attribute * add_shared(ustring name, const TypeDesc type, AttributeElement element, const void *data, int size, ImplicitSharingInfo sharing_info)
void join(const size_t x, const size_t y)
void insert(int v0, int v1)
bool exists(int v0, int v1)
void tag_position_modified()
const packed_float3 * get_position() const
void tag_update(Scene *scene, bool rebuild)
bool need_attribute(const Scene *scene, AttributeStandard std)
size_t get_num_subd_faces() const
@ SUBDIVISION_ADAPTIVE_SPACE_OBJECT
@ SUBDIVISION_ADAPTIVE_SPACE_PIXEL
NODE_DECLARE size_t num_verts() const
void reserve_subd_creases(const size_t num_creases)
AttributeSet subd_attributes
void copy_center_to_motion_step(const int motion_step)
void set_num_subd_faces(const size_t num_subd_faces_)
void add_vertex_crease(const int v, const float weight)
@ SUBDIVISION_CATMULL_CLARK
size_t num_triangles() const
void resize_subd_faces(const int numfaces, const int numcorners)
void resize_mesh(const int numverts, const int numtris)
void add_edge_crease(const int v0, const int v1, const float weight)
@ MOTION_PASS_INTERACTIVE
bool operator()(const int &vert_idx_a, const int &vert_idx_b)
const packed_float3 * verts_
VertexAverageComparator(const packed_float3 *verts, size_t)
const CPPType & type() const
VArray< T > typed() const
constexpr int64_t size() const
constexpr int64_t start() const
constexpr const T * data() const
constexpr int64_t size() const
constexpr IndexRange index_range() const
constexpr bool is_empty() const
void foreach_attribute(const FunctionRef< void(const AttributeIter &)> fn) const
GAttributeReader lookup(const StringRef name) const
GAttributeReader get() const
const DataVariant & data() const
DataVariant & data_for_write()
constexpr bool is_empty() const
constexpr IndexRange index_range() const
IndexRange index_range() const
#define CCL_NAMESPACE_END
float hash_uint_to_float(uint kx)
#define assert(assertion)
VecBase< float, D > normalize(VecOp< float, D >) RET
float dot(VecOp< float, D >, VecOp< float, D >) RET
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
constexpr T clamp(T, U, U) RET
VecT safe_normalize(VecT vector)
@ ATTR_SUBDIVIDE_SMOOTH_FVAR
@ ATTR_ELEMENT_CORNER_BYTE
@ ATTR_STD_GENERATED_TRANSFORM
@ ATTR_STD_RANDOM_PER_ISLAND
ccl_device float safe_acosf(const float a)
ccl_device_inline dual1 len_squared(const ccl_private dual< T > &a)
CCL_NAMESPACE_BEGIN ccl_device_inline float3 zero_float3()
ccl_device_inline int4 cast(const float4 a)
void to_static_type(const CPPType &cpp_type, Fn &&fn)
void normals_calc_corners(Span< float3 > vert_positions, OffsetIndices< int > faces, Span< int > corner_verts, Span< int > corner_edges, GroupedSpan< int > vert_to_face_map, Span< float3 > face_normals, Span< bool > sharp_edges, Span< bool > sharp_faces, Span< short2 > custom_normals, CornerNormalSpaceArray *r_fan_spaces, MutableSpan< float3 > r_corner_normals)
void vert_tris_from_corner_tris(Span< int > corner_verts, Span< int3 > corner_tris, MutableSpan< int3 > vert_tris)
IndexRange face_triangles_range(OffsetIndices< int > faces, int face_i)
void normals_calc_faces(Span< float3 > vert_positions, OffsetIndices< int > faces, Span< int > corner_verts, MutableSpan< float3 > face_normals)
bool attribute_name_is_anonymous(const StringRef name)
@ SUBSURF_ADAPTIVE_SPACE_PIXEL
@ SUBSURF_ADAPTIVE_SPACE_OBJECT
const char * BKE_id_name(const ID &id)
@ eSubsurfModifierFlag_UseCrease
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
VecBase< int32_t, 3 > int3
VecBase< int16_t, 2 > short2
VecBase< float, 3 > float3
ColorSceneLinearByteEncoded4b< eAlpha::Premultiplied > ColorGeometry4b
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
blender::Object * real_object
vector< SocketType, std::allocator< SocketType > > inputs
void set_value(const SocketType &socket, const Node &other, const SocketType &other_socket)
ListBaseT< ModifierData > modifiers
const ImplicitSharingInfo * sharing_info