[Bf-blender-cvs] [4f72d90] bake-cycles: Merge remote-tracking branch 'upstream/master' into bake-cycles

Dalai Felinto noreply at git.blender.org
Fri Apr 25 17:40:46 CEST 2014


Commit: 4f72d903c77423be2c37bc7b251c8e43a35ffcfd
Author: Dalai Felinto
Date:   Fri Apr 25 12:31:29 2014 -0300
https://developer.blender.org/rB4f72d903c77423be2c37bc7b251c8e43a35ffcfd

Merge remote-tracking branch 'upstream/master' into bake-cycles

(this should fix windows building hopefully)

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

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



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

diff --cc source/blender/blenloader/intern/versioning_270.c
index 99c0975,507d711..050f41b
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -183,25 -181,33 +184,55 @@@ void blo_do_versions_270(FileData *fd, 
  		}
  	}
  
+ 	if (!MAIN_VERSION_ATLEAST(main, 270, 4)) {
+ 		/* ui_previews were not handled correctly when copying areas, leading to corrupted files (see T39847).
+ 		 * This will always reset situation to a valid state.
+ 		 */
+ 		bScreen *sc;
+ 
+ 		for (sc = main->screen.first; sc; sc = sc->id.next) {
+ 			ScrArea *sa;
+ 			for (sa = sc->areabase.first; sa; sa = sa->next) {
+ 				SpaceLink *sl;
+ 
+ 				for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ 					ARegion *ar;
+ 					ListBase *lb = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
+ 
+ 					for (ar = lb->first; ar; ar = ar->next) {
+ 						BLI_listbase_clear(&ar->ui_previews);
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	if (!DNA_struct_elem_find(fd->filesdna, "Material", "int", "mode2")) { /* will be replaced with version check when other new flag is added to mode2 */
+ 		Material *ma;
+ 
+ 		for (ma = main->mat.first; ma; ma = ma->id.next)
+ 			ma->mode2 = MA_CASTSHADOW;
+ 	}
++
 +	if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "BakeData", "bake")) {
 +		Scene *sce;
 +
 +		for (sce = main->scene.first; sce; sce = sce->id.next) {
 +			sce->r.bake.flag = R_BAKE_SAVE_EXTERNAL;
 +			sce->r.bake.width = 512;
 +			sce->r.bake.height = 512;
 +			sce->r.bake.margin = 16;
 +			sce->r.bake.normal_space = R_BAKE_SPACE_TANGENT;
 +			sce->r.bake.normal_swizzle[0] = R_BAKE_POSX;
 +			sce->r.bake.normal_swizzle[1] = R_BAKE_POSY;
 +			sce->r.bake.normal_swizzle[2] = R_BAKE_POSZ;
 +			BLI_strncpy(sce->r.bake.filepath, U.renderdir, sizeof(sce->r.bake.filepath));
 +
 +			sce->r.bake.im_format.planes = R_IMF_PLANES_RGBA;
 +			sce->r.bake.im_format.imtype = R_IMF_IMTYPE_PNG;
 +			sce->r.bake.im_format.depth = R_IMF_CHAN_DEPTH_8;
 +			sce->r.bake.im_format.quality = 90;
 +			sce->r.bake.im_format.compress = 15;
 +		}
 +	}
  }




More information about the Bf-blender-cvs mailing list