mirror of
https://github.com/blender/blender
synced 2026-09-26 16:15:47 +03:00
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:
parent
7a13f0a14d
commit
3cc933d024
1 changed files with 9 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue