Fix #138329: Workbench Material color type broken for meshes with no material.
Regression from 368c737fe7. Forgot to fully move to using
`BKE_id_new_nomain` at some point for default materials, instead
of doing more low-level set of 'alloc liblock, initialize it with
default values'.
This commit is contained in:
@@ -2031,8 +2031,7 @@ static Material **default_materials[] = {&default_material_empty,
|
||||
|
||||
static Material *material_default_create(Material **ma_p, const char *name)
|
||||
{
|
||||
*ma_p = static_cast<Material *>(
|
||||
BKE_libblock_alloc_in_lib(nullptr, std::nullopt, ID_MA, name, LIB_ID_CREATE_NO_MAIN));
|
||||
*ma_p = static_cast<Material *>(BKE_id_new_nomain(ID_MA, name));
|
||||
return *ma_p;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user