[Bf-blender-cvs] [2da034d] multiview: Merge remote-tracking branch 'origin/master' into multiview

Dalai Felinto noreply at git.blender.org
Wed Jan 21 19:32:04 CET 2015


Commit: 2da034db2fa9695c6adc64e8d48147a0d0c53cbb
Author: Dalai Felinto
Date:   Wed Jan 21 16:28:49 2015 -0200
Branches: multiview
https://developer.blender.org/rB2da034db2fa9695c6adc64e8d48147a0d0c53cbb

Merge remote-tracking branch 'origin/master' into multiview

Conflicts:
	intern/cycles/blender/addon/ui.py
	source/blender/makesrna/intern/rna_space.c

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



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

diff --cc intern/cycles/blender/addon/ui.py
index 43fd309,da303ce..afdcc13
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@@ -1464,7 -1417,7 +1464,8 @@@ def get_panels()
          "DATA_PT_vertex_colors",
          "DATA_PT_camera",
          "DATA_PT_camera_display",
 +        "DATA_PT_camera_stereoscopy",
+         "DATA_PT_camera_safe_areas",
          "DATA_PT_lens",
          "DATA_PT_speaker",
          "DATA_PT_distance",
diff --cc source/blender/blenloader/intern/versioning_270.c
index 807320e,c652f56..acd8edc
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -464,104 -457,75 +464,174 @@@ void blo_do_versions_270(FileData *fd, 
  
  #undef BRUSH_RAKE
  #undef BRUSH_RANDOM_ROTATION
 +
 +	/* MV before merge: add a MAIN_VERSION_ATLEAST check */
 +	{
 +		if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "ListBase", "views")) {
 +			Scene *scene;
 +			SceneRenderView *srv;
 +			for (scene = main->scene.first; scene; scene = scene->id.next) {
 +				BKE_scene_add_render_view(scene, STEREO_LEFT_NAME);
 +				srv = (SceneRenderView *)scene->r.views.first;
 +				BLI_strncpy(srv->suffix, "_L", sizeof(srv->suffix));
 +
 +				BKE_scene_add_render_view(scene, STEREO_RIGHT_NAME);
 +				srv = (SceneRenderView *)scene->r.views.last;
 +				BLI_strncpy(srv->suffix, "_R", sizeof(srv->suffix));
 +			}
 +		}
 +
 +		if (!DNA_struct_elem_find(fd->filesdna, "View3D", "char", "stereo_camera")) {
 +			bScreen *screen;
 +			for (screen = main->screen.first; screen; screen = screen->id.next) {
 +				ScrArea *sa;
 +				for (sa = screen->areabase.first; sa; sa = sa->next) {
 +					SpaceLink *sl;
 +
 +					for (sl = sa->spacedata.first; sl; sl = sl->next) {
 +						switch (sl->spacetype) {
 +							case SPACE_VIEW3D:
 +							{
 +								View3D *v3d = (View3D *)sl;
 +								v3d->stereo3d_camera = STEREO_3D_ID;
 +								v3d->stereo3d_flag |= V3D_S3D_DISPPLANE;
 +								v3d->stereo3d_convergence_alpha = 0.15f;
 +								v3d->stereo3d_volume_alpha = 0.05f;
 +								break;
 +							}
 +							case SPACE_IMAGE:
 +							{
 +								SpaceImage *sima = (SpaceImage *) sl;
 +								sima->iuser.flag |= IMA_SHOW_STEREO;
 +								sima->iuser.passtype = SCE_PASS_COMBINED;
 +								break;
 +							}
 +						}
 +					}
 +				}
 +			}
 +		}
 +
 +		if (!DNA_struct_elem_find(fd->filesdna, "Camera", "CameraStereoSettings", "stereo")) {
 +			Camera *cam;
 +			for (cam = main->camera.first; cam; cam = cam->id.next) {
 +				cam->stereo.interocular_distance = 0.065;
 +				cam->stereo.convergence_distance = 30.f * 0.065;
 +			}
 +		}
 +
 +		if (!DNA_struct_elem_find(fd->filesdna, "Image", "Stereo3dFormat", "*stereo3d_format")) {
 +			Image *ima;
 +			for (ima = main->image.first; ima; ima = ima->id.next) {
 +				ima->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Image Stereo 3d Format");
 +			}
 +		}
 +
 +		if (!DNA_struct_elem_find(fd->filesdna, "Image", "ListBase", "packedfiles")) {
 +			Image *ima;
 +			for (ima = main->image.first; ima; ima = ima->id.next) {
 +				if (ima->packedfile) {
 +					ImagePackedFile *imapf = MEM_mallocN(sizeof(ImagePackedFile), "Image Packed File");
 +					BLI_addtail(&ima->packedfiles, imapf);
 +
 +					imapf->packedfile = ima->packedfile;
 +					BLI_strncpy(imapf->filepath, ima->name, FILE_MAX);
 +					ima->packedfile = NULL;
 +				}
 +			}
 +		}
 +
 +		if (!DNA_struct_elem_find(fd->filesdna, "wmWindow", "Stereo3dFormat", "*stereo3d_format")) {
 +			wmWindowManager *wm;
 +			wmWindow *win;
 +
 +			for (wm = main->wm.first; wm; wm = wm->id.next) {
 +				for (win = wm->windows.first; win; win = win->next) {
 +					win->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Stereo Display 3d Format");
 +				}
 +			}
 +		}
 +
 +		if (!DNA_struct_elem_find(fd->filesdna, "Sequence", "Stereo3dFormat", "*stereo3d_format")) {
 +			Scene *scene;
 +			for (scene = main->scene.first; scene; scene = scene->id.next) {
 +				Sequence *seq;
 +				SEQ_BEGIN (scene->ed, seq)
 +				{
 +					seq->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Stereo Display 3d Format");
 +				}
 +				SEQ_END
 +			}
 +		}
  	}
+ 
+ 	/* Customizable Safe Areas */
+ 	if (!MAIN_VERSION_ATLEAST(main, 273, 2)) {
+ 		if (!DNA_struct_elem_find(fd->filesdna, "Scene", "DisplaySafeAreas", "safe_areas")) {
+ 			Scene *scene;
+ 
+ 			for (scene = main->scene.first; scene; scene = scene->id.next) {
+ 				copy_v2_fl2(scene->safe_areas.title, 3.5f / 100.0f, 3.5f / 100.0f);
+ 				copy_v2_fl2(scene->safe_areas.action, 10.0f / 100.0f, 5.0f / 100.0f);
+ 				copy_v2_fl2(scene->safe_areas.title_center, 17.5f / 100.0f, 5.0f / 100.0f);
+ 				copy_v2_fl2(scene->safe_areas.action_center, 15.0f / 100.0f, 5.0f / 100.0f);
+ 			}
+ 		}
+ 	}
+ 	
+ 	if (!DNA_struct_elem_find(fd->filesdna, "ClothSimSettings", "float", "bending_damping")) {
+ 		Object *ob;
+ 		ModifierData *md;
+ 		for (ob = main->object.first; ob; ob = ob->id.next) {
+ 			for (md = ob->modifiers.first; md; md = md->next) {
+ 				if (md->type == eModifierType_Cloth) {
+ 					ClothModifierData *clmd = (ClothModifierData*) md;
+ 					clmd->sim_parms->bending_damping = 0.5f;
+ 				}
+ 				else if (md->type == eModifierType_ParticleSystem) {
+ 					ParticleSystemModifierData *pmd = (ParticleSystemModifierData*) md;
+ 					if (pmd->psys->clmd) {
+ 						pmd->psys->clmd->sim_parms->bending_damping = 0.5f;
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	if (!DNA_struct_elem_find(fd->filesdna, "ParticleSettings", "float", "clump_noise_size")) {
+ 		ParticleSettings *part;
+ 		for (part = main->particle.first; part; part = part->id.next) {
+ 			part->clump_noise_size = 1.0f;
+ 		}
+ 	}
+ 
+ 	if (!DNA_struct_elem_find(fd->filesdna, "ParticleSettings", "int", "kink_extra_steps")) {
+ 		ParticleSettings *part;
+ 		for (part = main->particle.first; part; part = part->id.next) {
+ 			part->kink_extra_steps = 4;
+ 		}
+ 	}
+ 
+ 	if (!DNA_struct_elem_find(fd->filesdna, "MTex", "float", "kinkampfac")) {
+ 		ParticleSettings *part;
+ 		for (part = main->particle.first; part; part = part->id.next) {
+ 			int a;
+ 			for (a = 0; a < MAX_MTEX; a++) {
+ 				MTex *mtex = part->mtex[a];
+ 				if (mtex) {
+ 					mtex->kinkampfac = 1.0f;
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 	if (!MAIN_VERSION_ATLEAST(main, 273, 3)) {
+ 		ParticleSettings *part;
+ 		for (part = main->particle.first; part; part = part->id.next) {
+ 			if (part->clumpcurve)
+ 				part->child_flag |= PART_CHILD_USE_CLUMP_CURVE;
+ 			if (part->roughcurve)
+ 				part->child_flag |= PART_CHILD_USE_ROUGH_CURVE;
+ 		}
+ 	}
  }
diff --cc source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index 10b4341,32b4c54..91e82b9
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@@ -494,9 -494,9 +494,9 @@@ void FRS_composite_result(Render *re, S
  		return;
  
  	rl = render_get_active_layer( freestyle_render, freestyle_render->result );
 -	if (!rl || rl->rectf == NULL) {
 +	if (!rl) {
  		if (G.debug & G_DEBUG_FREESTYLE) {
- 			cout << "Cannot find Freestyle result image" << endl;
+ 			cout << "No Freestyle result image to composite" << endl;
  		}
  		return;
  	}
diff --cc source/blender/makesrna/intern/rna_space.c
index ff5bd9b,c54822b..03e82f1
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@@ -863,25 -791,7 +863,25 @@@ static void rna_SpaceImageEditor_cursor
  	}
  }
  
 +static void rna_SpaceImageEditor_image_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 +{
 +	SpaceImage *sima = (SpaceImage *)ptr->data;
 +	Image *ima = sima->image;
 +
 +	/* make sure all the iuser settings are valid for the sima image */
 +	if (ima) {
 +		if (ima->rr) {
 +			if (BKE_image_multilayer_index(sima->image->rr, &sima->iuser) == NULL) {
 +				BKE_image_init_imageuser(sima->image, &sima->iuser);
 +			}
 +		}
 +		else {
 +			BKE_image_multiview_index(ima, &sima->iuser);
 +		}
 +	}
 +}
 +
- static void rna_SpaceImageEditor_scopes_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+ static void rna_SpaceImageEditor_scopes_update(struct bContext *C, struct PointerRNA *ptr)
  {
  	SpaceImage *sima = (SpaceImage *)ptr->data;
  	ImBuf *ibuf;




More information about the Bf-blender-cvs mailing list