[Bf-blender-cvs] [63ea7124e17] greasepencil-object: Merge branch 'blender2.8' into greasepencil-object

Antonio Vazquez noreply at git.blender.org
Sun Sep 10 12:16:15 CEST 2017


Commit: 63ea7124e173152d10edbb8d4b2eb07e0f1e2d3c
Author: Antonio Vazquez
Date:   Sun Sep 10 10:04:28 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB63ea7124e173152d10edbb8d4b2eb07e0f1e2d3c

Merge branch 'blender2.8' into greasepencil-object

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



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

diff --cc source/blender/blenloader/intern/versioning_280.c
index 49193ce920a,f022b393967..f12f86e0c40
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -499,72 -430,17 +499,81 @@@ void blo_do_versions_280(FileData *fd, 
  				}
  			}
  		}
 +
 +		/* grease pencil sculpt and paint cursors */
 +		if (!DNA_struct_elem_find(fd->filesdna, "GP_BrushEdit_Settings", "int", "weighttype")) {
 +			for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
 +				/* sculpt brushes */
 +				GP_BrushEdit_Settings *gset = &scene->toolsettings->gp_sculpt;
 +				if (gset) {
 +					gset->weighttype = GP_EDITBRUSH_TYPE_WEIGHT;
 +				}
 +			}
 +		}
 +
 +		if (!DNA_struct_elem_find(fd->filesdna, "bGPDbrush", "float", "curcolor[3]")) {
 +			float curcolor[3], curcolor_add[3], curcolor_sub[3];
 +			ARRAY_SET_ITEMS(curcolor, 1.0f, 1.0f, 1.0f);
 +			ARRAY_SET_ITEMS(curcolor_add, 1.0f, 0.6f, 0.6f);
 +			ARRAY_SET_ITEMS(curcolor_sub, 0.6f, 0.6f, 1.0f);
 +			GP_EditBrush_Data *gp_brush;
 +
 +			for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
 +				/* drawing brushes */
 +				ToolSettings *ts = scene->toolsettings;
 +				for (bGPDbrush *brush = ts->gp_brushes.first; brush; brush = brush->next) {
 +					brush->flag |= GP_BRUSH_ENABLE_CURSOR;
 +					copy_v3_v3(brush->curcolor, curcolor);
 +				}
 +				/* sculpt brushes */
 +				GP_BrushEdit_Settings *gset = &ts->gp_sculpt;
 +				for (int i = 0; i < TOT_GP_EDITBRUSH_TYPES; ++i) {
 +					gp_brush = &gset->brush[i];
 +					gp_brush->flag |= GP_EDITBRUSH_FLAG_ENABLE_CURSOR;
 +					copy_v3_v3(gp_brush->curcolor_add, curcolor_add);
 +					copy_v3_v3(gp_brush->curcolor_sub, curcolor_sub);
 +				}
 +			}
 +		}
 +		/* init grease pencil vertex groups */
 +		if (!DNA_struct_elem_find(fd->filesdna, "bGPDweight", "int", "index")) {
 +			for (bGPdata *gpd = main->gpencil.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) {
 +							for (int i = 0; i < gps->totpoints; ++i) {
 +								bGPDspoint *pt = &gps->points[i];
 +								pt->totweight = 0;
 +								pt->weights = NULL;
 +							}
 +						}
 +					}
 +				}
 +			}
 +		}
 +		/* init grease pencil edit line color */
 +		if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "float", "line_color[4]")) {
 +			for (bGPdata *gpd = main->gpencil.first; gpd; gpd = gpd->id.next) {
 +				ARRAY_SET_ITEMS(gpd->line_color, 0.6f, 0.6f, 0.6f, 0.3f);
 +			}
 +		}
 +		/* init pixel size factor */
 +		if (!DNA_struct_elem_find(fd->filesdna, "bGPDdata", "int", "pixfactor")) {
 +			for (bGPdata *gpd = main->gpencil.first; gpd; gpd = gpd->id.next) {
 +				gpd->pixfactor = GP_DEFAULT_PIX_FACTOR;
 +			}
 +		}
  	}
  
+ 	if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "cascade_max_dist"))	{
+ 		for (Lamp *la = main->lamp.first; la; la = la->id.next) {
+ 			la->cascade_max_dist = 1000.0f;
+ 			la->cascade_count = 4;
+ 			la->cascade_exponent = 0.8f;
+ 			la->cascade_fade = 0.1f;
+ 		}
+ 	}
+ 
  	{
  		typedef enum eNTreeDoVersionErrors {
  			NTREE_DOVERSION_NO_ERROR = 0,



More information about the Bf-blender-cvs mailing list