Cleanup: BKE: Use StringRefNull instead of char *

Use StringRefNull for all function arguments and return types.
Not a StringRef but StringRefNull since there is still large
interaction with C api so null-termination usually necessary.

If string is expected to be not only empty but also a null then
optional is used. This change depends on #130935.

Pull Request: https://projects.blender.org/blender/blender/pulls/131204
This commit is contained in:
Iliya Katueshenock
2024-12-02 19:24:07 +01:00
committed by Hans Goudey
parent bc430c4e67
commit 7348e670b3
22 changed files with 216 additions and 185 deletions

View File

@@ -4144,7 +4144,7 @@ static PyObject *pyrna_struct_bl_rna_get_subclass(PyObject *cls, PyObject *args)
if (srna_base == &RNA_Node) {
/* If the given idname is an alias, translate it to the proper idname. */
id = blender::bke::node_type_find_alias(id);
id = blender::bke::node_type_find_alias(id).c_str();
blender::bke::bNodeType *nt = blender::bke::node_type_find(id);
if (nt) {