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.
This commit is contained in:
parent
3679f899fb
commit
0f0e7239f0
Notes:
blender-bot
2023-02-14 05:16:25 +01:00
Referenced by issue #80651, Material tab disappears
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue