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:
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 41d8ff9bc9e..c42e2531f25 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -877,7 +877,7 @@ int /*eContextResult*/ buttons_context(const bContext *C,
return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "scene")) {
- /* Do not return one here if scene not found in path,
+ /* Do not return one here if scene is not found in path,
* in this case we want to get default context scene! */
return set_pointer_type(path, result, &RNA_Scene);
}
@@ -886,8 +886,9 @@ int /*eContextResult*/ buttons_context(const bContext *C,
return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "collection")) {
- set_pointer_type(path, result, &RNA_Collection);
- return CTX_RESULT_OK;
+ /* Do not return one here if collection is not found in path,
+ * in this case we want to get default context collection! */
+ return set_pointer_type(path, result, &RNA_Collection);
}
if (CTX_data_equals(member, "object")) {
set_pointer_type(path, result, &RNA_Object);