[Bf-blender-cvs] [4fbf78996bc] greasepencil-refactor: Merge branch 'greasepencil-object' into greasepencil-refactor

Antonio Vazquez noreply at git.blender.org
Fri Dec 13 16:29:32 CET 2019


Commit: 4fbf78996bc0f7bc557257407f68b11caca1afbe
Author: Antonio Vazquez
Date:   Fri Dec 13 16:29:05 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB4fbf78996bc0f7bc557257407f68b11caca1afbe

Merge branch 'greasepencil-object' into greasepencil-refactor

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

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



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

diff --cc source/blender/blenloader/intern/versioning_280.c
index e39b512e2dd,c4dae5fdd8a..c59b4a27b9f
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -4320,34 -4320,29 +4320,59 @@@ void blo_do_versions_280(FileData *fd, 
        }
      }
  
+     /* Add primary tile to images. */
+     if (!DNA_struct_elem_find(fd->filesdna, "Image", "ListBase", "tiles")) {
+       for (Image *ima = bmain->images.first; ima; ima = ima->id.next) {
+         ImageTile *tile = MEM_callocN(sizeof(ImageTile), "Image Tile");
+         tile->ok = 1;
+         tile->tile_number = 1001;
+         BLI_addtail(&ima->tiles, tile);
+       }
+     }
+ 
+     /* UDIM Image Editor change. */
+     if (!DNA_struct_elem_find(fd->filesdna, "SpaceImage", "int", "tile_grid_shape[2]")) {
+       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_IMAGE) {
+               SpaceImage *sima = (SpaceImage *)sl;
+               sima->tile_grid_shape[0] = 1;
+               sima->tile_grid_shape[1] = 1;
+             }
+           }
+         }
+       }
+     }
++
 +    /* Update Grease Pencil Materials */
 +    {
 +      for (Material *mat = bmain->materials.first; mat; mat = mat->id.next) {
 +        MaterialGPencilStyle *gp_style = mat->gp_style;
 +        if (gp_style == NULL) {
 +          continue;
 +        }
 +        /* Set Checker material as Solid. This fill mode has been removed and replaced
 +         * by textures. */
 +        if (gp_style->fill_style == GP_STYLE_FILL_STYLE_CHECKER) {
 +          gp_style->fill_style = GP_STYLE_FILL_STYLE_SOLID;
 +        }
 +        /* Update Alpha channel for texture opacity. */
 +        if (gp_style->fill_style == GP_STYLE_FILL_STYLE_TEXTURE) {
 +          gp_style->fill_rgba[3] *= gp_style->texture_opacity;
 +        }
 +        /* Stroke stencil mask to mix = 1. */
 +        if (gp_style->flag & GP_STYLE_STROKE_PATTERN) {
 +          gp_style->mix_stroke_factor = 1.0f;
 +#if 0 /* TODO: This is disabled for testing only. */
 +          gp_style->flag &= ~GP_STYLE_STROKE_PATTERN;
 +#endif
 +        }
 +        /* Mix disabled, set mix factor to 0. */
 +        else if ((gp_style->flag & GP_STYLE_STROKE_TEX_MIX) == 0) {
 +          gp_style->mix_stroke_factor = 0.0f;
 +        }
 +      }
 +    }
    }
  }



More information about the Bf-blender-cvs mailing list