[Bf-blender-cvs] [ff7e734f8c9] greasepencil-object: Merge branch 'master' into greasepencil-object
Antonio Vazquez
noreply at git.blender.org
Wed Dec 11 16:46:53 CET 2019
Commit: ff7e734f8c90debbc38ff10620544d09ccd4a97b
Author: Antonio Vazquez
Date: Wed Dec 11 16:46:48 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBff7e734f8c90debbc38ff10620544d09ccd4a97b
Merge branch 'master' into greasepencil-object
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/versioning_280.c
index a35e4cc0d75,68ea821996f..7e195b13d38
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -4240,61 -4264,20 +4240,71 @@@ void blo_do_versions_280(FileData *fd,
}
}
}
+
+ /* Init new Grease Pencil Paint tools. */
+ {
+ for (Brush *brush = bmain->brushes.first; brush; brush = brush->id.next) {
+ if (brush->gpencil_settings != NULL) {
+ brush->gpencil_vertex_tool = brush->gpencil_settings->brush_type;
+ }
+ }
+
+ for (Brush *brush = bmain->brushes.first; brush; brush = brush->id.next) {
+ if (brush->gpencil_settings != NULL) {
+ brush->gpencil_sculpt_tool = brush->gpencil_settings->brush_type;
+ }
+ }
+
+ for (Brush *brush = bmain->brushes.first; brush; brush = brush->id.next) {
+ if (brush->gpencil_settings != NULL) {
+ brush->gpencil_weight_tool = brush->gpencil_settings->brush_type;
+ }
+ }
+
+ BKE_paint_toolslots_init_from_main(bmain);
+ }
+
+ /* Init default Grease Pencil Vertex paint mix factor for Viewport. */
+ {
+ if (!DNA_struct_elem_find(
+ fd->filesdna, "View3DOverlay", "float", "gpencil_vertex_paint_opacity")) {
+ for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
+ for (ScrArea *area = screen->areabase.first; area; area = area->next) {
+ for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *)sl;
+ v3d->overlay.gpencil_vertex_paint_opacity = 1.0f;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /* Init default Grease Pencil Vertex paint layer mix factor. */
+ {
+ if (!DNA_struct_elem_find(fd->filesdna, "bGPDlayer", "float", "vertex_paint_opacity")) {
+ for (bGPdata *gpd = bmain->gpencils.first; gpd; gpd = gpd->id.next) {
+ for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
+ gpl->vertex_paint_opacity = 1.0f;
+ }
+ }
+ }
+ }
}
+ /**
+ * Versioning code until next subversion bump goes here.
+ *
+ * \note Be sure to check when bumping the version:
+ * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend
+ * - "versioning_userdef.c", #do_versions_theme
+ *
+ * \note Keep this message at the bottom of the function.
+ */
{
- /* Versioning code until next subversion bump goes here. */
+ /* Keep this block, even when empty. */
+
/* Cloth internal springs */
for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
for (ModifierData *md = ob->modifiers.first; md; md = md->next) {
More information about the Bf-blender-cvs
mailing list