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:
committed by
Hans Goudey
parent
bc430c4e67
commit
7348e670b3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user