[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38432] branches/soc-2011-salad: Merging r38420 through r3843 from trunk1 into soc-2011-salad

Sergey Sharybin g.ulairi at gmail.com
Sat Jul 16 11:59:45 CEST 2011


Revision: 38432
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38432
Author:   nazgul
Date:     2011-07-16 09:59:45 +0000 (Sat, 16 Jul 2011)
Log Message:
-----------
Merging r38420 through r3843 from trunk1 into soc-2011-salad

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38420
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=3843

Modified Paths:
--------------
    branches/soc-2011-salad/CMakeLists.txt
    branches/soc-2011-salad/SConstruct
    branches/soc-2011-salad/intern/mikktspace/mikktspace.c
    branches/soc-2011-salad/source/blender/editors/space_view3d/view3d_buttons.c

Property Changed:
----------------
    branches/soc-2011-salad/


Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38430
/trunk/blender:36834-38419
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38430
/trunk/blender:36834-38431

Modified: branches/soc-2011-salad/CMakeLists.txt
===================================================================
--- branches/soc-2011-salad/CMakeLists.txt	2011-07-16 09:56:55 UTC (rev 38431)
+++ branches/soc-2011-salad/CMakeLists.txt	2011-07-16 09:59:45 UTC (rev 38432)
@@ -733,10 +733,14 @@
 		endif()
 
 		if(WITH_PYTHON)
-			set(PYTHON_VERSION 3.2)
-			set(PYTHON_INCLUDE_DIRS "${LIBDIR}/python/include/python${PYTHON_VERSION}")
-			# set(PYTHON_BINARY python) # not used yet
-			set(PYTHON_LIBRARIES ${LIBDIR}/python/lib/python32.lib)
+			# normally cached but not since we include them with blender
+			set(PYTHON_VERSION 3.2) # CACHE STRING)
+			set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}") # CACHE PATH)
+			set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python32.lib") #CACHE FILEPATH)
+
+			# uncached vars
+			set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+			set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
 		endif()
 
 		set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
@@ -836,12 +840,14 @@
 		endif()
 
 		if(WITH_PYTHON)
-			set(PYTHON ${LIBDIR}/python)
-			set(PYTHON_VERSION 3.2)
-			set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}")
-			# set(PYTHON_BINARY python) # not used yet
-			set(PYTHON_LIBRARIES ${PYTHON}/lib/python32mw.lib)
-			set(PYTHON_LIBPATH ${PYTHON}/lib)
+			# normally cached but not since we include them with blender
+			set(PYTHON_VERSION 3.2) #  CACHE STRING)
+			set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")  # CACHE PATH)
+			set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python32mw.lib")  # CACHE FILEPATH)
+
+			# uncached vars
+			set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+			set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
 		endif()
 
 		set(PLATFORM_LINKFLAGS "--stack,2097152")
@@ -892,27 +898,33 @@
 		set(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib)  # TODO, deprecate
 	endif()
 
-	set(PYTHON_VERSION 3.2)
+	if(WITH_PYTHON)
+		set(PYTHON_VERSION 3.2)
+		if(PYTHON_VERSION MATCHES 3.2)
+			# we use precompiled libraries for py 3.2 and up by default
 
-	if(PYTHON_VERSION MATCHES 3.2)
-		# we use precompiled libraries for py 3.2 and up by default
+			# normally cached but not since we include them with blender
+			set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")
+			# set(PYTHON_BINARY "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
+			set(PYTHON_LIBRARY python${PYTHON_VERSION})
+			set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
+			# set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
+		else()
+			# otherwise, use custom system framework
+			# *not used but maintained incase some dev wants to*
 
-		set(PYTHON ${LIBDIR}/python)
-		set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}")
-		# set(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}") # not used yet
-		set(PYTHON_LIBRARIES python${PYTHON_VERSION})
-		set(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}")
-		# set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
-	else()
-		# otherwise, use custom system framework
+			set(PYTHON "/System/Library/Frameworks/Python.framework/Versions/" CACHE PATH)
+			set(PYTHON_INCLUDE_DIR "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE PATH)
+			# set(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
+			set(PYTHON_LIBRARY "" CACHE FILEPATH)
+			set(PYTHON_LIBPATH "${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config" CACHE PATH)
+			set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python" CACHE STRING)
+			unset(PYTHON)
+		endif()
 
-		set(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
-		set(PYTHON_VERSION 3.2)
-		set(PYTHON_INCLUDE_DIRS "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}")
-		# set(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
-		set(PYTHON_LIBRARIES "")
-		set(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config)
-		set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
+		# uncached vars
+		set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+		set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
 	endif()
 
 	if(WITH_INTERNATIONAL)
@@ -1211,6 +1223,20 @@
 	endif()
 endif()
 
+
+# ensure python header is found since detection can fail, this could happen
+# with _any_ library but since we used a fixed python version this tends to
+# be most problematic.
+if(WITH_PYTHON)
+	if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h")
+		message(FATAL_ERROR "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n"
+							"Set the cache entry 'PYTHON_INCLUDE_DIR' to point "
+							"to a valid python include path. Containing "
+							"Python.h for python version \"${PYTHON_VERSION}\"")
+	endif()
+endif()
+
+
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
 

Modified: branches/soc-2011-salad/SConstruct
===================================================================
--- branches/soc-2011-salad/SConstruct	2011-07-16 09:56:55 UTC (rev 38431)
+++ branches/soc-2011-salad/SConstruct	2011-07-16 09:59:45 UTC (rev 38432)
@@ -361,6 +361,23 @@
         print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
     Exit()
 
+
+# ensure python header is found since detection can fail, this could happen
+# with _any_ library but since we used a fixed python version this tends to
+# be most problematic.
+if env['WITH_BF_PYTHON']:
+	py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h")
+
+	if not os.path.exists(py_h):
+		print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n"
+			  "  Set 'BF_PYTHON_INC' to point "
+			  "to a valid python include path.\n  Containing "
+			  "Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
+
+		Exit()
+	del py_h
+
+
 if not os.path.isdir ( B.root_build_dir):
     os.makedirs ( B.root_build_dir )
     os.makedirs ( B.root_build_dir + 'source' )

Modified: branches/soc-2011-salad/intern/mikktspace/mikktspace.c
===================================================================
--- branches/soc-2011-salad/intern/mikktspace/mikktspace.c	2011-07-16 09:56:55 UTC (rev 38431)
+++ branches/soc-2011-salad/intern/mikktspace/mikktspace.c	2011-07-16 09:59:45 UTC (rev 38432)
@@ -243,7 +243,7 @@
 	int iNrActiveGroups = 0, index = 0;
 	const int iNrFaces = pContext->m_pInterface->m_getNumFaces(pContext);
 	tbool bRes = TFALSE;
-	const float fThresCos = (const float) cos((fAngularThreshold*(float)M_PI)/180.0f);
+	const float fThresCos = (float) cos((fAngularThreshold*(float)M_PI)/180.0f);
 
 	// verify all call-backs have been set
 	if( pContext->m_pInterface->m_getNumFaces==NULL ||
@@ -1411,7 +1411,7 @@
 			// weight contribution by the angle
 			// between the two edge vectors
 			fCos = vdot(v1,v2); fCos=fCos>1?1:(fCos<(-1) ? (-1) : fCos);
-			fAngle = (const float) acos(fCos);
+			fAngle = (float) acos(fCos);
 			fMagS = pTriInfos[f].fMagS;
 			fMagT = pTriInfos[f].fMagT;
 

Modified: branches/soc-2011-salad/source/blender/editors/space_view3d/view3d_buttons.c
===================================================================
--- branches/soc-2011-salad/source/blender/editors/space_view3d/view3d_buttons.c	2011-07-16 09:56:55 UTC (rev 38431)
+++ branches/soc-2011-salad/source/blender/editors/space_view3d/view3d_buttons.c	2011-07-16 09:59:45 UTC (rev 38432)
@@ -967,7 +967,7 @@
 	ebone= arm->act_edbone;
 
 	if (!ebone || (ebone->layer & arm->layer)==0) {
-		uiItemL(col, "Nothing selected", ICON_NONE);
+		uiItemL(layout, "Nothing selected", ICON_NONE);
 		return;
 	}
 //	row= uiLayoutRow(layout, 0);




More information about the Bf-blender-cvs mailing list