diff options
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 64f2afff782..0b018d05058 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -73,11 +73,11 @@ static int set_pointer_type(ButsContextPath *path, bContextDataResult *result, S if (RNA_struct_is_a(ptr->type, type)) { CTX_data_pointer_set(result, ptr->owner_id, ptr->type, ptr->data); - return 1; + return CTX_RESULT_OK; } } - return 0; + return CTX_RESULT_MEMBER_NOT_FOUND; } static PointerRNA *get_pointer_type(ButsContextPath *path, StructRNA *type) @@ -907,7 +907,7 @@ int /*eContextResult*/ buttons_context(const bContext *C, ButsContextTexture *ct = sbuts->texuser; if (!ct) { - return -1; + return CTX_RESULT_NO_DATA; } if (ct->user && ct->user->ptr.data) { @@ -921,7 +921,7 @@ int /*eContextResult*/ buttons_context(const bContext *C, ButsContextTexture *ct = sbuts->texuser; if (!ct) { - return -1; + return CTX_RESULT_NO_DATA; } if (ct->user && ct->user->ptr.data) { @@ -958,7 +958,7 @@ int /*eContextResult*/ buttons_context(const bContext *C, } } else if (ct) { - return 0; /* new shading system */ + return CTX_RESULT_MEMBER_NOT_FOUND; /* new shading system */ } else if ((ptr = get_pointer_type(path, &RNA_FreestyleLineStyle))) { FreestyleLineStyle *ls = ptr->data; |