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

Dalai Felinto noreply at git.blender.org
Sun Mar 15 18:08:21 CET 2015


Commit: 281b49cfa8892def6045aa9aa13d6dd4f20a81c5
Author: Dalai Felinto
Date:   Sun Mar 15 18:08:06 2015 +0100
Branches: multiview
https://developer.blender.org/rB281b49cfa8892def6045aa9aa13d6dd4f20a81c5

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

Conflicts:
	source/blender/blenkernel/intern/packedFile.c
	source/blender/editors/space_view3d/view3d_draw.c
	source/blender/makesrna/intern/rna_scene.c

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



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

diff --cc source/blender/blenkernel/intern/packedFile.c
index 3e39210,8d56b12..6516cbe
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@@ -531,48 -564,23 +564,47 @@@ int unpackSound(Main *bmain, ReportLis
  
  int unpackImage(ReportList *reports, Image *ima, int how)
  {
 -	char localname[FILE_MAX], absname[FILE_MAX];
 -	char *newname;
  	int ret_value = RET_ERROR;
 -	
 +
  	if (ima != NULL && ima->name[0]) {
 -		unpack_generate_paths(ima->name, (ID *)ima, absname, localname, sizeof(absname), sizeof(localname));
 -		newname = unpackFile(reports, absname, localname, ima->packedfile, how);
 -		if (newname != NULL) {
 -			ret_value = RET_OK;
 -			freePackedFile(ima->packedfile);
 -			ima->packedfile = NULL;
 -			BLI_strncpy(ima->name, newname, sizeof(ima->name));
 -			MEM_freeN(newname);
 -			BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
 +		while (ima->packedfiles.last) {
- 			char localname[FILE_MAXDIR + FILE_MAX], fi[FILE_MAX];
++			char localname[FILE_MAX], absname[FILE_MAX];
 +			char *newname;
 +			ImagePackedFile *imapf = ima->packedfiles.last;
 +
- 			BLI_split_file_part(imapf->filepath, fi, sizeof(fi));
- 			BLI_snprintf(localname, sizeof(localname), "//textures/%s", fi);
++			unpack_generate_paths(imapf->filepath, (ID *)ima, absname, localname, sizeof(absname), sizeof(localname));
++			newname = unpackFile(reports, absname, localname, imapf->packedfile, how);
 +
- 			newname = unpackFile(reports, imapf->filepath, localname, imapf->packedfile, how);
 +			if (newname != NULL) {
 +				ImageView *iv;
 +
 +				ret_value = ret_value == RET_ERROR ? RET_ERROR : RET_OK;
 +				freePackedFile(imapf->packedfile);
 +				imapf->packedfile = NULL;
 +
 +				/* update the new corresponding view filepath */
 +				iv = BLI_findstring(&ima->views, imapf->filepath, offsetof(ImageView, filepath));
 +				if (iv) {
 +					BLI_strncpy(iv->filepath, newname, sizeof(imapf->filepath));
 +				}
 +
 +				/* keep the new name in the image for non-pack specific reasons */
 +				BLI_strncpy(ima->name, newname, sizeof(imapf->filepath));
 +				MEM_freeN(newname);
 +			}
 +			else {
 +				ret_value = RET_ERROR;
 +			}
 +
 +			BLI_remlink(&ima->packedfiles, imapf);
 +			MEM_freeN(imapf);
  		}
  	}
 -	
 +
 +	if (ret_value == RET_OK) {
 +		BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
 +	}
 +
  	return(ret_value);
  }
  
diff --cc source/blender/editors/render/render_opengl.c
index 8d99a60,402e72d..0f63010
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@@ -252,9 -136,10 +252,9 @@@ static void screen_opengl_render_doit(O
  	int sizey = oglrender->sizey;
  	const short view_context = (v3d != NULL);
  	bool draw_bgpic = true;
- 	bool draw_sky = (scene->r.alphamode == R_ADDSKY) && v3d && (v3d->flag3 & V3D_SHOW_WORLD);
+ 	bool draw_sky = (scene->r.alphamode == R_ADDSKY);
  	unsigned char *rect = NULL;
 -
 -	rr = RE_AcquireResultRead(oglrender->re);
 +	const char *viewname = RE_GetActiveRenderView(oglrender->re);
  
  	if (oglrender->is_sequencer) {
  		SeqRenderData context;
diff --cc source/blender/editors/space_view3d/view3d_draw.c
index 952ff4f,58ef918..2eb517d
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@@ -3223,8 -3192,8 +3221,8 @@@ ImBuf *ED_view3d_draw_offscreen_imbuf(S
  	/* render 3d view */
  	if (rv3d->persp == RV3D_CAMOB && v3d->camera) {
  		CameraParams params;
- 		GPUFXSettings fx_settings = {0};
+ 		GPUFXSettings fx_settings = {NULL};
 -		Object *camera = v3d->camera;
 +		Object *camera = BKE_camera_render(scene, v3d->camera, viewname);
  
  		BKE_camera_params_init(&params);
  		/* fallback for non camera objects */
diff --cc source/blender/makesrna/intern/rna_scene.c
index 6c5d4b2,3e7ffcd..60a4163
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@@ -1012,25 -943,35 +1017,54 @@@ static EnumPropertyItem *rna_ImageForma
  	}
  }
  
 +static EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf(bContext *UNUSED(C), PointerRNA *ptr,
-                                                                     PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
++PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
 +{
 +	ImageFormatData *imf = (ImageFormatData *)ptr->data;
 +
 +	if (imf == NULL) {
 +		return views_format_items;
 +	}
 +	else if (imf->imtype == R_IMF_IMTYPE_OPENEXR) {
 +		return views_format_multiview_items;
 +	}
 +	else if (imf->imtype == R_IMF_IMTYPE_MULTILAYER) {
 +		return views_format_multilayer_items;
 +	}
 +	else {
 +		return views_format_items;
 +	}
 +}
 +
+ #ifdef WITH_OPENEXR
+ 	/* OpenEXR */
+ 
+ static EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), bool *r_free)
+ {
+ 	ImageFormatData *imf = (ImageFormatData *)ptr->data;
+ 
+ 	EnumPropertyItem *item = NULL;
+ 	int i = 1, totitem = 0;
+ 
+ 	if (imf->depth == 16)
+ 		return exr_codec_items; /* All compression types are defined for halfs */
+ 
+ 	for (i = 0; i < R_IMF_EXR_CODEC_MAX; i++) {
+ 		if ((i == R_IMF_EXR_CODEC_B44 || i == R_IMF_EXR_CODEC_B44A)) {
+ 			continue; /* B44 and B44A are not defined for 32 bit floats */
+ 		}
+ 
+ 		RNA_enum_item_add(&item, &totitem, &exr_codec_items[i]);
+ 	}
+ 
+ 	RNA_enum_item_end(&item, &totitem);
+ 	*r_free = true;
+ 
+ 	return item;
+ }
+ 
+ #endif
  static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
  {
  	RenderData *rd = (RenderData *)ptr->data;
@@@ -4437,8 -4135,10 +4471,9 @@@ static void rna_def_scene_image_format_
  	prop = RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
  	RNA_def_property_enum_sdna(prop, NULL, "exr_codec");
  	RNA_def_property_enum_items(prop, exr_codec_items);
+ 	RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_exr_codec_itemf");
  	RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
  	RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 -
  #endif
  
  #ifdef WITH_OPENJPEG
diff --cc source/blender/windowmanager/intern/wm_window.c
index 59a77fb,4f7e5ab..154f13a
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@@ -369,12 -363,10 +369,14 @@@ static void wm_window_add_ghostwindow(w
  	/* force setting multisamples only once, it requires restart - and you cannot 
  	 * mix it, either all windows have it, or none (tested in OSX opengl) */
  	if (multisamples == -1)
- 		glSettings.numOfAASamples = U.ogl_multisamples;
+ 		multisamples = U.ogl_multisamples;
+ 
+ 	glSettings.numOfAASamples = multisamples;
  
 +	/* a new window is created when pageflip mode is required for a window */
 +	if (win->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP)
 +		glSettings.flags |= GHOST_glStereoVisual;
 +
  	if (!(U.uiflag2 & USER_OPENGL_NO_WARN_SUPPORT))
  		glSettings.flags |= GHOST_glWarnSupport;




More information about the Bf-blender-cvs mailing list