[Bf-blender-cvs] [a4010149382] greasepencil-object: Merge branch 'master' into greasepencil-object

Antonio Vazquez noreply at git.blender.org
Thu Nov 28 19:09:21 CET 2019


Commit: a40101493826ad3e34b935ca78dc1efa1c862d2e
Author: Antonio Vazquez
Date:   Thu Nov 28 19:05:49 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBa40101493826ad3e34b935ca78dc1efa1c862d2e

Merge branch 'master' into greasepencil-object

 Conflicts:
	source/blender/blenloader/intern/versioning_280.c

===================================================================



===================================================================

diff --cc source/blender/blenloader/intern/versioning_280.c
index 5cfe45bc0d0,47e55a55ea1..6f5d12943f7
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -4208,55 -4232,22 +4208,73 @@@ void blo_do_versions_280(FileData *fd, 
        ups->flag &= ~(UNIFIED_PAINT_FLAG_UNUSED_0 | UNIFIED_PAINT_FLAG_UNUSED_1);
      }
  
+     /* Set the default render pass in the viewport to Combined. */
+     if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "int", "render_pass")) {
+       for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
+         scene->display.shading.render_pass = SCE_PASS_COMBINED;
+       }
+ 
+       for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
+         for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
+           for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+             if (sl->spacetype == SPACE_VIEW3D) {
+               View3D *v3d = (View3D *)sl;
+               v3d->shading.render_pass = SCE_PASS_COMBINED;
+             }
+           }
+         }
+       }
+     }
++
 +    /* 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 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 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;
 +          }
 +        }
 +      }
 +    }
    }
  }



More information about the Bf-blender-cvs mailing list