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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user