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:
authorCampbell Barton <ideasman42@gmail.com>2021-08-31 05:45:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-31 06:00:31 +0300
commitc758b87c5e1dbad174779d69340ad1983a94198c (patch)
tree57479c5458f8c45d72c353de02d306374a231e0c /source/blender/editors/space_buttons
parentea575744b8c9badb7f9b56fba625adb059ff3b5c (diff)
Cleanup: add CTX_data_pointer_set_ptr & CTX_data_list_add_ptr
Many callers expanded a PointerRNA argument, so add a version of these functions that takes a PointerRNA.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index bf855db07e9..91b0677ebaa 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -72,7 +72,7 @@ static int set_pointer_type(ButsContextPath *path, bContextDataResult *result, S
PointerRNA *ptr = &path->ptr[i];
if (RNA_struct_is_a(ptr->type, type)) {
- CTX_data_pointer_set(result, ptr->owner_id, ptr->type, ptr->data);
+ CTX_data_pointer_set_ptr(result, ptr);
return CTX_RESULT_OK;
}
}
@@ -1003,7 +1003,7 @@ int /*eContextResult*/ buttons_context(const bContext *C,
if (ct->user && ct->user->ptr.data) {
ButsTextureUser *user = ct->user;
- CTX_data_pointer_set(result, user->ptr.owner_id, user->ptr.type, user->ptr.data);
+ CTX_data_pointer_set_ptr(result, &user->ptr);
}
return CTX_RESULT_OK;
@@ -1092,7 +1092,7 @@ int /*eContextResult*/ buttons_context(const bContext *C,
PointerRNA *ptr = get_pointer_type(path, &RNA_ParticleSettings);
if (ptr && ptr->data) {
- CTX_data_pointer_set(result, ptr->owner_id, &RNA_ParticleSettings, ptr->data);
+ CTX_data_pointer_set_ptr(result, ptr);
return CTX_RESULT_OK;
}