Fix #113496: Crash in sculpt mode when Float2 attributes used on Vertices
The old logic had a hard-coded assumption that Float2 attribute is an UV-map. This assumption is now resolved. Pair programming session with Hans. Pull Request: https://projects.blender.org/blender/blender/pulls/113535
This commit is contained in:
committed by
Sergey Sharybin
parent
535d211c94
commit
a12a3dc73a
@@ -714,9 +714,14 @@ struct PBVHBatches {
|
||||
break;
|
||||
}
|
||||
case CD_PROP_FLOAT2: {
|
||||
const float2 *uv_map = static_cast<const float2 *>(
|
||||
CustomData_get_layer_named(args.loop_data, CD_PROP_FLOAT2, vbo.name.c_str()));
|
||||
extract_data_corner_faces<float2, float2>(args, {uv_map, args.me->totloop}, vert_buf);
|
||||
const float2 *data = static_cast<const float2 *>(CustomData_get_layer_named(
|
||||
get_cdata(vbo.domain, args), CD_PROP_FLOAT2, vbo.name.c_str()));
|
||||
if (vbo.domain == ATTR_DOMAIN_POINT) {
|
||||
extract_data_vert_faces<float2, float2>(args, {data, args.me->totvert}, vert_buf);
|
||||
}
|
||||
else if (vbo.domain == ATTR_DOMAIN_CORNER) {
|
||||
extract_data_corner_faces<float2, float2>(args, {data, args.me->totloop}, vert_buf);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user