Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuki Hashimoto <hzuika>2022-03-29 16:27:15 +0300
committerCampbell Barton <campbell@blender.org>2022-03-29 16:29:15 +0300
commit9ec77d709c3cd8cc6b210fd4c5fbf762bd18188e (patch)
treeb53c5b647bd386d2aef4915f3d4dc7d2a8631071 /source/blender/windowmanager/intern/wm_operators.c
parent4a5cd4e6c75d2a41ba0bffd971cd768ee76077ae (diff)
Fix T63795: Display custom properties with brackets in info
When custom properties are changed, they are displayed with brackets in info. Ref D14380
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index b45c638d7b9..a3d2d38136c 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -588,7 +588,13 @@ char *WM_context_path_resolve_property_full(const bContext *C,
if (data_path != NULL) {
if (prop != NULL) {
char *prop_str = RNA_path_property_py(ptr, prop, index);
- member_id_data_path = BLI_string_join_by_sep_charN('.', member_id, data_path, prop_str);
+ if (prop_str[0] == '[') {
+ member_id_data_path = BLI_string_joinN(member_id, ".", data_path, prop_str);
+ }
+ else {
+ member_id_data_path = BLI_string_join_by_sep_charN(
+ '.', member_id, data_path, prop_str);
+ }
MEM_freeN(prop_str);
}
else {
@@ -600,7 +606,12 @@ char *WM_context_path_resolve_property_full(const bContext *C,
else {
if (prop != NULL) {
char *prop_str = RNA_path_property_py(ptr, prop, index);
- member_id_data_path = BLI_string_join_by_sep_charN('.', member_id, prop_str);
+ if (prop_str[0] == '[') {
+ member_id_data_path = BLI_string_joinN(member_id, prop_str);
+ }
+ else {
+ member_id_data_path = BLI_string_join_by_sep_charN('.', member_id, prop_str);
+ }
MEM_freeN(prop_str);
}
else {