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

Antonio Vazquez noreply at git.blender.org
Wed Nov 27 20:32:32 CET 2019


Commit: da29260ab6a2730323019107b6e9acd5df526454
Author: Antonio Vazquez
Date:   Wed Nov 27 20:29:04 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBda29260ab6a2730323019107b6e9acd5df526454

Merge branch 'master' into greasepencil-object

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

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



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

diff --cc source/blender/blenloader/intern/versioning_280.c
index ed7d06f1ab5,7c33e853ed1..5cfe45bc0d0
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -3891,25 -4160,11 +4121,26 @@@ void blo_do_versions_280(FileData *fd, 
          }
        }
      }
 +
 +    {
 +      /* Initialize new grease pencil uv scale parameter. */
 +      if (!DNA_struct_elem_find(fd->filesdna, "bGPDstroke", "float", "uv_scale")) {
 +        for (bGPdata *gpd = bmain->gpencils.first; gpd; gpd = gpd->id.next) {
 +          for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
 +            for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
 +              for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
 +                gps->uv_scale = 1.0f;
 +              }
 +            }
 +          }
 +        }
 +      }
 +    }
    }
  
-   {
-     /* Versioning code until next subversion bump goes here. */
+   if (!MAIN_VERSION_ATLEAST(bmain, 282, 2)) {
+     do_version_curvemapping_walker(bmain, do_version_curvemapping_flag_extend_extrapolate);
+ 
      for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
        for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
          sa->flag &= ~AREA_FLAG_UNUSED_6;
@@@ -3955,55 -4210,26 +4186,77 @@@
        }
      }
  
+     /* Cloth pressure */
+     for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
+       for (ModifierData *md = ob->modifiers.first; md; md = md->next) {
+         if (md->type == eModifierType_Cloth) {
+           ClothModifierData *clmd = (ClothModifierData *)md;
+ 
+           clmd->sim_parms->pressure_factor = 1;
+         }
+       }
+     }
+   }
+ 
+   {
+     /* Versioning code until next subversion bump goes here. */
+ 
+     /* Remove Unified pressure/size and pressure/alpha */
+     for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
+       ToolSettings *ts = scene->toolsettings;
+       UnifiedPaintSettings *ups = &ts->unified_paint_settings;
+       ups->flag &= ~(UNIFIED_PAINT_FLAG_UNUSED_0 | UNIFIED_PAINT_FLAG_UNUSED_1);
+     }
++
 +    /* 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