Cleanup: Rename enum values

This makes the diff for adding a new version of the attribute transfer
node slightly smaller.
This commit is contained in:
Hans Goudey 2021-10-07 14:00:11 -05:00
parent e9daca77d6
commit 9708b1f317
3 changed files with 6 additions and 6 deletions

View File

@ -2136,8 +2136,8 @@ typedef enum GeometryNodeCurveFilletMode {
} GeometryNodeCurveFilletMode;
typedef enum GeometryNodeAttributeTransferMapMode {
GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED = 0,
GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST = 1,
GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED = 0,
GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST = 1,
} GeometryNodeAttributeTransferMapMode;
typedef enum GeometryNodeRaycastMapMode {

View File

@ -10522,13 +10522,13 @@ static void def_geo_curve_trim(StructRNA *srna)
static void def_geo_attribute_transfer(StructRNA *srna)
{
static EnumPropertyItem mapping_items[] = {
{GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED,
{GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED,
"NEAREST_FACE_INTERPOLATED",
0,
"Nearest Face Interpolated",
"Transfer the attribute from the nearest face on a surface (loose points and edges are "
"ignored)"},
{GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST,
{GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST,
"NEAREST",
0,
"Nearest",

View File

@ -463,12 +463,12 @@ static void transfer_attribute(const GeoNodeExecParams &params,
"position", dst_domain, {0, 0, 0});
switch (mapping) {
case GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED: {
case GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED: {
transfer_attribute_nearest_face_interpolated(
src_geometry, dst_component, dst_positions, dst_domain, data_type, src_name, dst_name);
break;
}
case GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST: {
case GEO_NODE_LEGACY_ATTRIBUTE_TRANSFER_NEAREST: {
transfer_attribute_nearest(
src_geometry, dst_component, dst_positions, dst_domain, data_type, src_name, dst_name);
break;