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:
authorSebastian Parborg <darkdefende@gmail.com>2020-09-10 15:49:47 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-09-10 15:51:18 +0300
commit0f0e7239f02720a4077ee10dea0e3de6e605417d (patch)
treebf90f611294b7ff7695f0b284248e3b641101934 /source/blender/editors/space_buttons/buttons_context.c
parent3679f899fb6048efd47a7325df65d7bcefc92482 (diff)
Fix T80651: Material tab disappears
Always return true if the object can have materials. Even if there are not currently any materials assigned to the object.
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, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 2cfda8644df..e0a5158e510 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -333,11 +333,10 @@ static bool buttons_context_path_material(ButsContextPath *path)
if (ob && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
ma = BKE_object_material_get(ob, ob->actcol);
- if (ma == NULL) {
- return false;
+ if (ma != NULL) {
+ RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
+ path->len++;
}
- RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
- path->len++;
return true;
}
}