[Bf-blender-cvs] [17cbaf5] HMD_viewport: Merge branch 'master' into HMD_viewport

Julian Eisel noreply at git.blender.org
Thu Sep 8 13:30:32 CEST 2016


Commit: 17cbaf5d164856eebcce5b21e07a1f3b5ef4086b
Author: Julian Eisel
Date:   Thu Sep 8 13:30:20 2016 +0200
Branches: HMD_viewport
https://developer.blender.org/rB17cbaf5d164856eebcce5b21e07a1f3b5ef4086b

Merge branch 'master' into HMD_viewport

Conflicts:
	intern/ghost/intern/GHOST_System.cpp
	intern/ghost/intern/GHOST_System.h
	source/blender/blenkernel/BKE_blender_version.h
	source/blender/blenloader/CMakeLists.txt
	source/blender/blenloader/intern/versioning_270.c
	source/blender/windowmanager/CMakeLists.txt
	source/blender/windowmanager/intern/wm_window.c
	source/blenderplayer/bad_level_call_stubs/CMakeLists.txt

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



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

diff --cc build_files/cmake/macros.cmake
index ab5620a,fabb35c..e554226
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@@ -505,10 -508,12 +512,15 @@@ function(setup_liblink
  			target_link_libraries(${target} ${CUDA_CUDA_LIBRARY})
  		endif()
  	endif()
 +	if(WITH_OPENHMD AND WITH_OPENHMD_DYNLOAD)
 +		target_link_libraries(${target} "extern_udew")
 +	endif()
  
+ 	target_link_libraries(
+ 		${target}
+ 		${ZLIB_LIBRARIES}
+ 	)
+ 
  	#system libraries with no dependencies such as platform link libs or opengl should go last
  	target_link_libraries(${target}
  			${BLENDER_GL_LIBRARIES})
@@@ -1576,3 -1578,26 +1589,26 @@@ macro(openmp_delayloa
  			endif(WITH_OPENMP)
  		endif(MSVC)
  endmacro()
+ 
+ MACRO(WINDOWS_SIGN_TARGET target)
+ 	if (WITH_WINDOWS_CODESIGN)
+ 		if (!SIGNTOOL_EXE)
+ 			error("Codesigning is enabled, but signtool is not found")
+ 		else()
+ 			if (WINDOWS_CODESIGN_PFX_PASSWORD)
+ 				set(CODESIGNPASSWORD /p ${WINDOWS_CODESIGN_PFX_PASSWORD})
+ 			else()
+ 				if ($ENV{PFXPASSWORD})
+ 					set(CODESIGNPASSWORD /p $ENV{PFXPASSWORD})
+ 				else()
+ 					message( FATAL_ERROR "WITH_WINDOWS_CODESIGN is on but WINDOWS_CODESIGN_PFX_PASSWORD not set, and environment variable PFXPASSWORD not found, unable to sign code.")
+ 				endif()
+ 			endif()
+ 			add_custom_command(TARGET ${target}
+ 						POST_BUILD
+ 						COMMAND ${SIGNTOOL_EXE} sign /f ${WINDOWS_CODESIGN_PFX} ${CODESIGNPASSWORD} $<TARGET_FILE:${target}>
+ 						VERBATIM
+ 				)
+ 		endif()
+ 	endif()
 -ENDMACRO()
++ENDMACRO()
diff --cc intern/ghost/GHOST_ISystem.h
index 5b9e8e1,03193d6..9202ed1
--- a/intern/ghost/GHOST_ISystem.h
+++ b/intern/ghost/GHOST_ISystem.h
@@@ -383,13 -383,9 +384,14 @@@ public
  	 * \param deadzone: Deadzone of the 3D mouse (both for rotation and pan) relative to full range
  	 */
  	virtual void setNDOFDeadZone(float deadzone) = 0;
+ #endif
  
  	/**
 +	 * \return A pointer to our OpenHMD manager.
 +	 */
 +	virtual GHOST_OpenHMDManager *getOpenHMDManager() const = 0;
 +
 +	/**
  	 * Toggles console
  	 * \param action
  	 * - 0: Hides
diff --cc intern/ghost/intern/GHOST_System.cpp
index 0cc2052,56d68b9..39d077f
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@@ -41,9 -41,10 +41,11 @@@
  #include "GHOST_TimerTask.h"
  #include "GHOST_TimerManager.h"
  #include "GHOST_WindowManager.h"
 +#include "GHOST_OpenHMDManager.h"
  
+ #ifdef WITH_INPUT_NDOF
+ #  include "GHOST_NDOFManager.h"
+ #endif
  
  GHOST_System::GHOST_System()
      : m_nativePixel(false),
diff --cc intern/ghost/intern/GHOST_System.h
index acd93e1,af08399..0096abf
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@@ -48,8 -48,9 +48,10 @@@ class GHOST_Event
  class GHOST_TimerManager;
  class GHOST_Window;
  class GHOST_WindowManager;
+ #ifdef WITH_INPUT_NDOF
  class GHOST_NDOFManager;
+ #endif
 +class GHOST_OpenHMDManager;
  
  /**
   * Implementation of platform independent functionality of the GHOST_ISystem
diff --cc source/blender/blenloader/CMakeLists.txt
index a11a291,8cb9ef8..df90760
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@@ -77,10 -77,13 +77,17 @@@ if(WITH_CODEC_FFMPEG
  	add_definitions(-DWITH_FFMPEG)
  endif()
  
+ if(WITH_ALEMBIC)
+ 	list(APPEND INC
+ 		../alembic
+ 	)
+ 	add_definitions(-DWITH_ALEMBIC)
+ endif()
+ 
 +if(WITH_INPUT_HMD)
 +	add_definitions(-DWITH_INPUT_HMD)
 +endif()
 +
  blender_add_lib(bf_blenloader "${SRC}" "${INC}" "${INC_SYS}")
  
  # needed so writefile.c can use dna_type_offsets.h
diff --cc source/blender/blenloader/intern/versioning_270.c
index c612c78,dfaa59c..6064970
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -1252,12 -1262,134 +1262,143 @@@ void blo_do_versions_270(FileData *fd, 
  		}
  	}
  
+ 	if (!MAIN_VERSION_ATLEAST(main, 277, 3)) {
+ 		/* ------- init of grease pencil initialization --------------- */
+ 		if (!DNA_struct_elem_find(fd->filesdna, "bGPDstroke", "bGPDpalettecolor", "*palcolor")) {
+ 			for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
+ 				ToolSettings *ts = scene->toolsettings;
+ 				/* initialize use position for sculpt brushes */
+ 				ts->gp_sculpt.flag |= GP_BRUSHEDIT_FLAG_APPLY_POSITION;
+ 				/* initialize  selected vertices alpha factor */
+ 				ts->gp_sculpt.alpha = 1.0f;
+ 
+ 				/* new strength sculpt brush */
+ 				if (ts->gp_sculpt.brush[0].size >= 11) {
+ 					GP_BrushEdit_Settings *gset = &ts->gp_sculpt;
+ 					GP_EditBrush_Data *brush;
+ 
+ 					brush = &gset->brush[GP_EDITBRUSH_TYPE_STRENGTH];
+ 					brush->size = 25;
+ 					brush->strength = 0.5f;
+ 					brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+ 				}
+ 			}
+ 			/* create a default grease pencil drawing brushes set */
+ 			if (!BLI_listbase_is_empty(&main->gpencil)) {
+ 				for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
+ 					ToolSettings *ts = scene->toolsettings;
+ 					if (BLI_listbase_is_empty(&ts->gp_brushes)) {
+ 						BKE_gpencil_brush_init_presets(ts);
+ 					}
+ 				}
+ 			}
+ 			/* Convert Grease Pencil to new palettes/brushes
+ 			 * Loop all strokes and create the palette and all colors
+ 			 */
+ 			for (bGPdata *gpd = main->gpencil.first; gpd; gpd = gpd->id.next) {
+ 				if (BLI_listbase_is_empty(&gpd->palettes)) {
+ 					/* create palette */
+ 					bGPDpalette *palette = BKE_gpencil_palette_addnew(gpd, "GP_Palette", true);
+ 					for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
+ 						/* create color using layer name */
+ 						bGPDpalettecolor *palcolor = BKE_gpencil_palettecolor_addnew(palette, gpl->info, true);
+ 						if (palcolor != NULL) {
+ 							/* set color attributes */
+ 							copy_v4_v4(palcolor->color, gpl->color);
+ 							copy_v4_v4(palcolor->fill, gpl->fill);
+ 							
+ 							if (gpl->flag & GP_LAYER_HIDE)       palcolor->flag |= PC_COLOR_HIDE;
+ 							if (gpl->flag & GP_LAYER_LOCKED)     palcolor->flag |= PC_COLOR_LOCKED;
+ 							if (gpl->flag & GP_LAYER_ONIONSKIN)  palcolor->flag |= PC_COLOR_ONIONSKIN;
+ 							if (gpl->flag & GP_LAYER_VOLUMETRIC) palcolor->flag |= PC_COLOR_VOLUMETRIC;
+ 							if (gpl->flag & GP_LAYER_HQ_FILL)    palcolor->flag |= PC_COLOR_HQ_FILL;
+ 							
+ 							/* set layer opacity to 1 */
+ 							gpl->opacity = 1.0f;
+ 							
+ 							/* set tint color */
+ 							ARRAY_SET_ITEMS(gpl->tintcolor, 0.0f, 0.0f, 0.0f, 0.0f);
+ 							
+ 							/* flush relevant layer-settings to strokes */
+ 							for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
+ 								for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
+ 									/* set stroke to palette and force recalculation */
+ 									BLI_strncpy(gps->colorname, gpl->info, sizeof(gps->colorname));
+ 									gps->palcolor = NULL;
+ 									gps->flag |= GP_STROKE_RECALC_COLOR;
+ 									gps->thickness = gpl->thickness;
+ 									
+ 									/* set alpha strength to 1 */
+ 									for (int i = 0; i < gps->totpoints; i++) {
+ 										gps->points[i].strength = 1.0f;
+ 									}
+ 								}
+ 							}
+ 						}
+ 						
+ 						/* set thickness to 0 (now it is a factor to override stroke thickness) */
+ 						gpl->thickness = 0.0f;
+ 					}
+ 					/* set first color as active */
+ 					if (palette->colors.first)
+ 						BKE_gpencil_palettecolor_setactive(palette, palette->colors.first);
+ 				}
+ 			}
+ 		}
+ 		/* ------- end of grease pencil initialization --------------- */
+ 	}
+ 
+ 	if (!MAIN_VERSION_ATLEAST(main, 278, 0)) {
+ 		if (!DNA_struct_elem_find(fd->filesdna, "MovieTrackingTrack", "float", "weight_stab")) {
+ 			MovieClip *clip;
+ 			for (clip = main->movieclip.first; clip; clip = clip->id.next) {
+ 				MovieTracking *tracking = &clip->tracking;
+ 				MovieTrackingObject *tracking_object;
+ 				for (tracking_object = tracking->objects.first;
+ 				     tracking_object != NULL;
+ 				     tracking_object = tracking_object->next)
+ 				{
+ 					ListBase *tracksbase = BKE_tracking_object_get_tracks(tracking, tracking_object);
+ 					MovieTrackingTrack *track;
+ 					for (track = tracksbase->first;
+ 					     track != NULL;
+ 					     track = track->next)
+ 					{
+ 						track->weight_stab = track->weight;
+ 					}
+ 				}
+ 			}
+ 		}
+ 
+ 		if (!DNA_struct_elem_find(fd->filesdna, "MovieTrackingStabilization", "int", "tot_rot_track")) {
+ 			MovieClip *clip;
+ 			for (clip = main->movieclip.first; clip != NULL; clip = clip->id.next) {
+ 				if (clip->tracking.stabilization.rot_track) {
+ 					migrate_single_rot_stabilization_track_settings(&clip->tracking.stabilization);
+ 				}
+ 				if (clip->tracking.stabilization.scale == 0.0f) {
+ 					/* ensure init.
+ 					 * Was previously used for autoscale only,
+ 					 * now used always (as "target scale") */
+ 					clip->tracking.stabilization.scale = 1.0f;
+ 				}
+ 				/* blender prefers 1-based frame counting;
+ 				 * thus using frame 1 as reference typically works best */
+ 				clip->tracking.stabilization.anchor_frame = 1;
+ 				/* by default show the track lists expanded, to improve "discoverability" */
+ 				clip->tracking.stabilization.flag |= TRACKING_SHOW_STAB_TRACKS;
+ 				/* deprecated, not used anymore */
+ 				clip->tracking.stabilization.ok = false;
+ 			}
+ 		}
+ 	}
++
 +	{
 +		if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "char", "hmd_view_shade")) {
 +			for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
 +				scene->r.hmd_view_shade = OB_MATERIAL;
 +				scene->r.hmd_fx_flags |= GPU_FX_FLAG_LensDist;
 +			}
 +		}
 +	}
  }
diff --cc source/blender/gpu/CMakeLists.txt
index 1c01fc3,8885209..9608246
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@@ -78,10 -78,9 +78,11 @@@ set(SR
  	shaders/gpu_shader_vsm_store_frag.glsl
  	shaders/gpu_shader_vsm_store_vert.glsl
  	shaders/gpu_shader_fx_depth_resolve.glsl
+ 	shaders/gpu_shader_fire_frag.glsl
  	shaders/gpu_shader_smoke_frag.glsl
  	shaders/gpu_shader_smoke_vert.glsl
 +	shaders/gpu_shader_fx_lensdistortion_frag.glsl
 +	shaders/gpu_shader_fx_lensdistortion_vert.glsl
  
  	GPU_basic_shader.h
  	GPU_buffers.h
diff --cc source/blender/windowmanager/CMakeLi

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list