GPv3: Assign correct GP material #113526

Merged
Pratik Borhade merged 1 commits from PratikPB2123/blender:gpv3-material into main 2023-10-11 13:06:20 +02:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit a6517ed6b6 - Show all commits

View File

@ -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 {