Geometry Nodes: Rename Nodes ID Names + Menu Org

Re-alphabetize the main add menu.

Rename Node ID Names:
FloatCompare => CompareFloats
AttributeCapture => CaptureAttribute
Boolean => MeshBoolean
CurveFill => FillCurve
CurveFillet => FilletCurve
CurveReverse => ReverseCurve
CurveSample => SampleCurve
CurveResmaple => ResampleCurve
CurveSubdivide => SubdivideCurve
CurveTrim => TrimCurve
MaterialReplace => ReplaceMaterial
MeshSubdivide => SubdivideMesh
EdgeSplit => SplitEdges

Differential Revision: https://developer.blender.org/D12865
This commit is contained in:
2021-10-14 12:06:42 -05:00
parent 17b8da7196
commit 42a05ff6ea
20 changed files with 108 additions and 87 deletions

View File

@@ -113,3 +113,17 @@ void version_node_socket_name(bNodeTree *ntree,
}
}
}
/**
* Replace the ID name of all nodes in the tree with the given type with the new name.
*/
void version_node_id(bNodeTree *ntree, const int node_type, const char *new_name)
{
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
if (node->type == node_type) {
if (!STREQ(node->idname, new_name)) {
strcpy(node->idname, new_name);
}
}
}
}