GPv3: Conversion: Convert some object-data flags

This adds conversion for the following flags:
- `GREASE_PENCIL_ANIM_CHANNEL_EXPANDED`
- `GREASE_PENCIL_AUTOLOCK_LAYERS`
- `GREASE_PENCIL_STROKE_ORDER_3D`

Note: The last two are not expose through the UI yet.
This commit is contained in:
Falk David 2024-03-14 17:02:41 +01:00
parent 7a13f0a14d
commit 3cc933d024

View file

@ -400,6 +400,15 @@ void legacy_gpencil_to_grease_pencil(Main &bmain, GreasePencil &grease_pencil, b
grease_pencil.id.properties = IDP_CopyProperty(gpd.id.properties);
}
/** Convert Grease Pencil data flag. */
SET_FLAG_FROM_TEST(
grease_pencil.flag, (gpd.flag & GP_DATA_EXPAND) != 0, GREASE_PENCIL_ANIM_CHANNEL_EXPANDED);
SET_FLAG_FROM_TEST(grease_pencil.flag,
(gpd.flag & GP_DATA_AUTOLOCK_LAYERS) != 0,
GREASE_PENCIL_AUTOLOCK_LAYERS);
SET_FLAG_FROM_TEST(
grease_pencil.flag, (gpd.draw_mode == GP_DRAWMODE_3D), GREASE_PENCIL_STROKE_ORDER_3D);
int num_drawings = 0;
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd.layers) {
num_drawings += BLI_listbase_count(&gpl->frames);