Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-11-28 21:19:01 +0300
committerAntonioya <blendergit@gmail.com>2018-11-28 21:19:53 +0300
commit303b49ea37b7e1be96f357436428806b950897c1 (patch)
treeefbbab9298dd67125a5cd220fff0c1a6527c09d8 /source/blender/blenloader
parent565de7750b95db4296c421de9e96a8d334319e03 (diff)
Add Onion Skin support to Annotations
The old onion skinning used in 2.7x has been ported and converted to 2.8. Only basic features have been included. For more advanced onion skin features, use grease pencil objects. Onion Skin is supported in View 3D and Sequencer.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 1bec320b00a..5d1d4a9ad2f 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1116,7 +1116,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
/* Init grease pencil pixel size factor */
- if (!DNA_struct_elem_find(fd->filesdna, "bGPDdata", "int", "pixfactor")) {
+ if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "int", "pixfactor")) {
for (bGPdata *gpd = bmain->gpencil.first; gpd; gpd = gpd->id.next) {
gpd->pixfactor = GP_DEFAULT_PIX_FACTOR;
}
@@ -2463,5 +2463,16 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
STRNCPY(scene->r.engine, RE_engine_id_BLENDER_WORKBENCH);
}
}
+
+ /* init Annotations onion skin */
+ if (!DNA_struct_elem_find(fd->filesdna, "bGPDlayer", "int", "gstep")) {
+ for (bGPdata *gpd = bmain->gpencil.first; gpd; gpd = gpd->id.next) {
+ for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
+ ARRAY_SET_ITEMS(gpl->gcolor_prev, 0.302f, 0.851f, 0.302f);
+ ARRAY_SET_ITEMS(gpl->gcolor_next, 0.250f, 0.1f, 1.0f);
+ }
+ }
+ }
+
}
}