GPv3: Assign correct GP material
Creating new material on empty slot adds general material for GPv3 object. Instead GP material should be used. Found this issue while creating #113481 Pull Request: https://projects.blender.org/blender/blender/pulls/113526
This commit is contained in:
committed by
Pratik Borhade
parent
16ae169388
commit
4fabafa352
@@ -773,7 +773,7 @@ static int new_material_exec(bContext *C, wmOperator * /*op*/)
|
||||
}
|
||||
else {
|
||||
const char *name = DATA_("Material");
|
||||
if (!(ob != nullptr && ob->type == OB_GPENCIL_LEGACY)) {
|
||||
if (!(ob != nullptr && ELEM(ob->type, OB_GPENCIL_LEGACY, OB_GREASE_PENCIL))) {
|
||||
ma = BKE_material_add(bmain, name);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user