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:
authorPhilipp Oeser <info@graphics-engineer.com>2021-09-07 17:43:17 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-09-08 09:25:57 +0300
commit8d40d61af093fcf528ce282b740eca119a5ee5d3 (patch)
tree80b70b91b7863d5fad01af300b52959097e107d0
parent7beb4a0e0a49fdee3c4b98bcf9287ab72aaebda5 (diff)
Fix T91225: Quick Favorites and shortcuts are broken for some properties
Caused by {rB3e4d720ae483}. Before above commit, this had a different path handling and RNA_path_from_ID_to_struct() was always used [which kind of took care of this]. Now this is only used if ptr represents an ID itself, so we are "loosing" part of the path. This patch adds the path back on the member_id in wm_context_member_from_ptr() for everthing related to space_data, so WM_context_path_resolve_property_full() can construct a full path even for these. Maniphest Tasks: T91225 Differential Revision: https://developer.blender.org/D12418
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index df051328990..81dcc5ccea0 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -552,37 +552,38 @@ static const char *wm_context_member_from_ptr(bContext *C, const PointerRNA *ptr
const View3D *v3d = (View3D *)space_data;
const View3DShading *shading = &v3d->shading;
- TEST_PTR_DATA_TYPE("space_data", RNA_View3DOverlay, ptr, v3d);
- TEST_PTR_DATA_TYPE("space_data", RNA_View3DShading, ptr, shading);
+ TEST_PTR_DATA_TYPE("space_data.overlay", RNA_View3DOverlay, ptr, v3d);
+ TEST_PTR_DATA_TYPE("space_data.shading", RNA_View3DShading, ptr, shading);
break;
}
case SPACE_GRAPH: {
const SpaceGraph *sipo = (SpaceGraph *)space_data;
const bDopeSheet *ads = sipo->ads;
- TEST_PTR_DATA_TYPE("space_data", RNA_DopeSheet, ptr, ads);
+ TEST_PTR_DATA_TYPE("space_data.dopesheet", RNA_DopeSheet, ptr, ads);
break;
}
case SPACE_FILE: {
const SpaceFile *sfile = (SpaceFile *)space_data;
const FileSelectParams *params = ED_fileselect_get_active_params(sfile);
- TEST_PTR_DATA_TYPE("space_data", RNA_FileSelectParams, ptr, params);
+ TEST_PTR_DATA_TYPE("space_data.params", RNA_FileSelectParams, ptr, params);
break;
}
case SPACE_IMAGE: {
const SpaceImage *sima = (SpaceImage *)space_data;
- TEST_PTR_DATA_TYPE("space_data", RNA_SpaceUVEditor, ptr, sima);
+ TEST_PTR_DATA_TYPE("space_data.overlay", RNA_SpaceImageOverlay, ptr, sima);
+ TEST_PTR_DATA_TYPE("space_data.uv_editor", RNA_SpaceUVEditor, ptr, sima);
break;
}
case SPACE_NLA: {
const SpaceNla *snla = (SpaceNla *)space_data;
const bDopeSheet *ads = snla->ads;
- TEST_PTR_DATA_TYPE("space_data", RNA_DopeSheet, ptr, ads);
+ TEST_PTR_DATA_TYPE("space_data.dopesheet", RNA_DopeSheet, ptr, ads);
break;
}
case SPACE_ACTION: {
const SpaceAction *sact = (SpaceAction *)space_data;
const bDopeSheet *ads = &sact->ads;
- TEST_PTR_DATA_TYPE("space_data", RNA_DopeSheet, ptr, ads);
+ TEST_PTR_DATA_TYPE("space_data.dopesheet", RNA_DopeSheet, ptr, ads);
break;
}
}