GPv3: Return correct mode in BKE_paintmode_get_active_from_context

Previously this function would return `PAINT_MODE_TEXTURE_2D`.
This would result `paint_space_stroke_enabled` to return true, when it
shouldn't for Grease Pencil .
This commit is contained in:
Falk David
2023-07-27 12:22:47 +02:00
parent 4aef0204ac
commit 610834540a

View File

@@ -594,6 +594,8 @@ ePaintMode BKE_paintmode_get_active_from_context(const bContext *C)
return PAINT_MODE_SCULPT_UV;
case OB_MODE_SCULPT_CURVES:
return PAINT_MODE_SCULPT_CURVES;
case OB_MODE_PAINT_GREASE_PENCIL:
return PAINT_MODE_GPENCIL;
default:
return PAINT_MODE_TEXTURE_2D;
}