diff --git a/source/blender/makesrna/intern/rna_path.cc b/source/blender/makesrna/intern/rna_path.cc index 4b3da0764c1..eefda8e3c5c 100644 --- a/source/blender/makesrna/intern/rna_path.cc +++ b/source/blender/makesrna/intern/rna_path.cc @@ -1098,7 +1098,13 @@ static char *rna_path_from_ptr_to_property_index_ex( } else { if (is_rna) { - path = BLI_sprintfN("%s%s", propname, index_str); + if (index_dim == 0) { + /* Use direct duplication instead of #BLI_sprintfN because it's faster. */ + path = BLI_strdup(propname); + } + else { + path = BLI_sprintfN("%s%s", propname, index_str); + } } else { char propname_esc[MAX_IDPROP_NAME * 2];