diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt index a2a46358298..03ef6c8bdf2 100644 --- a/source/blender/editors/animation/CMakeLists.txt +++ b/source/blender/editors/animation/CMakeLists.txt @@ -10,6 +10,7 @@ set(INC ../../makesrna ../../sequencer ../../windowmanager + ../../../../extern/fmtlib/include # RNA_prototypes.h ${CMAKE_BINARY_DIR}/source/blender/makesrna ) diff --git a/source/blender/editors/animation/keyframing.cc b/source/blender/editors/animation/keyframing.cc index 75f8004781b..771be5ce4f3 100644 --- a/source/blender/editors/animation/keyframing.cc +++ b/source/blender/editors/animation/keyframing.cc @@ -9,6 +9,8 @@ #include #include +#include + #include "MEM_guardedalloc.h" #include "BLI_blenlib.h" @@ -298,9 +300,9 @@ static blender::Vector construct_rna_paths(PointerRNA *ptr) if (insert_channel_flags & USER_ANIM_KEY_CHANNEL_CUSTOM_PROPERTIES) { if (properties) { LISTBASE_FOREACH (IDProperty *, prop, &properties->data.group) { - std::string name = prop->name; - std::string rna_path = "[\"" + name + "\"]"; - paths.append(rna_path); + char name_escaped[MAX_IDPROP_NAME * 2]; + BLI_str_escape(name_escaped, prop->name, sizeof(name_escaped)); + paths.append(fmt::format("[\"{}\"]", name_escaped)); } } }