[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59020] branches/soc-2013-paint: Merge trunk -r59019 into soc-2013-paint

Antony Riakiotakis kalast at gmail.com
Thu Aug 8 11:47:47 CEST 2013


Revision: 59020
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59020
Author:   psy-fi
Date:     2013-08-08 09:47:47 +0000 (Thu, 08 Aug 2013)
Log Message:
-----------
Merge trunk -r59019 into soc-2013-paint

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

Modified Paths:
--------------
    branches/soc-2013-paint/CMakeLists.txt
    branches/soc-2013-paint/build_files/cmake/cmake_static_check_smatch.py
    branches/soc-2013-paint/build_files/cmake/cmake_static_check_sparse.py
    branches/soc-2013-paint/build_files/cmake/project_source_info.py
    branches/soc-2013-paint/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst
    branches/soc-2013-paint/intern/cycles/blender/blender_object.cpp
    branches/soc-2013-paint/intern/cycles/kernel/kernel_types.h
    branches/soc-2013-paint/intern/cycles/kernel/svm/svm_blackbody.h
    branches/soc-2013-paint/intern/cycles/render/blackbody.cpp
    branches/soc-2013-paint/intern/dualcon/intern/octree.cpp
    branches/soc-2013-paint/intern/guardedalloc/MEM_guardedalloc.h
    branches/soc-2013-paint/intern/mikktspace/mikktspace.c
    branches/soc-2013-paint/release/scripts/modules/bl_i18n_utils/utils_spell_check.py
    branches/soc-2013-paint/release/scripts/presets/keyconfig/3dsmax.py
    branches/soc-2013-paint/release/scripts/presets/keyconfig/maya.py
    branches/soc-2013-paint/source/blender/avi/intern/avi_mjpeg.c
    branches/soc-2013-paint/source/blender/blenfont/BLF_api.h
    branches/soc-2013-paint/source/blender/blenkernel/BKE_image.h
    branches/soc-2013-paint/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/action.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/constraint.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/curve.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/editderivedmesh.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/image.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/image_gen.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/key.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/library.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/multires.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/object.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/pbvh.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/shrinkwrap.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/smoke.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/tracking.c
    branches/soc-2013-paint/source/blender/blenlib/BLI_buffer.h
    branches/soc-2013-paint/source/blender/blenlib/BLI_memarena.h
    branches/soc-2013-paint/source/blender/blenlib/BLI_mempool.h
    branches/soc-2013-paint/source/blender/blenlib/BLI_string.h
    branches/soc-2013-paint/source/blender/blenlib/intern/math_matrix.c
    branches/soc-2013-paint/source/blender/blenlib/intern/scanfill.c
    branches/soc-2013-paint/source/blender/blenlib/intern/voronoi.c
    branches/soc-2013-paint/source/blender/blenloader/intern/readfile.c
    branches/soc-2013-paint/source/blender/blenloader/intern/writefile.c
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_smooth_laplacian.c
    branches/soc-2013-paint/source/blender/bmesh/tools/bmesh_decimate_collapse.c
    branches/soc-2013-paint/source/blender/compositor/CMakeLists.txt
    branches/soc-2013-paint/source/blender/compositor/COM_compositor.h
    branches/soc-2013-paint/source/blender/compositor/intern/COM_ExecutionGroup.cpp
    branches/soc-2013-paint/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
    branches/soc-2013-paint/source/blender/compositor/nodes/COM_SplitViewerNode.cpp
    branches/soc-2013-paint/source/blender/compositor/operations/COM_ViewerOperation.cpp
    branches/soc-2013-paint/source/blender/compositor/operations/COM_ViewerOperation.h
    branches/soc-2013-paint/source/blender/editors/animation/keyframes_draw.c
    branches/soc-2013-paint/source/blender/editors/armature/armature_select.c
    branches/soc-2013-paint/source/blender/editors/armature/pose_transform.c
    branches/soc-2013-paint/source/blender/editors/include/UI_interface.h
    branches/soc-2013-paint/source/blender/editors/interface/interface_handlers.c
    branches/soc-2013-paint/source/blender/editors/interface/interface_ops.c
    branches/soc-2013-paint/source/blender/editors/mask/mask_select.c
    branches/soc-2013-paint/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2013-paint/source/blender/editors/mesh/mesh_intern.h
    branches/soc-2013-paint/source/blender/editors/mesh/mesh_navmesh.c
    branches/soc-2013-paint/source/blender/editors/mesh/mesh_ops.c
    branches/soc-2013-paint/source/blender/editors/mesh/meshtools.c
    branches/soc-2013-paint/source/blender/editors/object/object_group.c
    branches/soc-2013-paint/source/blender/editors/object/object_hook.c
    branches/soc-2013-paint/source/blender/editors/object/object_vgroup.c
    branches/soc-2013-paint/source/blender/editors/render/render_opengl.c
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_utils.c
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_vertex.c
    branches/soc-2013-paint/source/blender/editors/space_file/space_file.c
    branches/soc-2013-paint/source/blender/editors/space_nla/nla_buttons.c
    branches/soc-2013-paint/source/blender/editors/space_node/node_add.c
    branches/soc-2013-paint/source/blender/editors/space_node/node_edit.c
    branches/soc-2013-paint/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2013-paint/source/blender/editors/space_view3d/drawvolume.c
    branches/soc-2013-paint/source/blender/editors/space_view3d/space_view3d.c
    branches/soc-2013-paint/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2013-paint/source/blender/editors/transform/transform.c
    branches/soc-2013-paint/source/blender/editors/transform/transform_conversions.c
    branches/soc-2013-paint/source/blender/editors/uvedit/uvedit_unwrap_ops.c
    branches/soc-2013-paint/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
    branches/soc-2013-paint/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
    branches/soc-2013-paint/source/blender/makesrna/SConscript
    branches/soc-2013-paint/source/blender/makesrna/intern/CMakeLists.txt
    branches/soc-2013-paint/source/blender/makesrna/intern/SConscript
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_dynamicpaint.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_object_api.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2013-paint/source/blender/modifiers/intern/MOD_boolean_util.c
    branches/soc-2013-paint/source/blender/modifiers/intern/MOD_decimate.c
    branches/soc-2013-paint/source/blender/modifiers/intern/MOD_laplaciansmooth.c
    branches/soc-2013-paint/source/blender/modifiers/intern/MOD_skin.c
    branches/soc-2013-paint/source/blender/modifiers/intern/MOD_warp.c
    branches/soc-2013-paint/source/blender/python/bmesh/bmesh_py_ops.c
    branches/soc-2013-paint/source/blender/python/bmesh/bmesh_py_types_meshdata.c
    branches/soc-2013-paint/source/blender/python/intern/bpy_rna.c
    branches/soc-2013-paint/source/blender/render/intern/include/zbuf.h
    branches/soc-2013-paint/source/blender/render/intern/source/bake.c
    branches/soc-2013-paint/source/blender/render/intern/source/convertblender.c
    branches/soc-2013-paint/source/blender/render/intern/source/envmap.c
    branches/soc-2013-paint/source/blender/render/intern/source/multires_bake.c
    branches/soc-2013-paint/source/blender/render/intern/source/occlusion.c
    branches/soc-2013-paint/source/blender/render/intern/source/pipeline.c
    branches/soc-2013-paint/source/blender/render/intern/source/pointdensity.c
    branches/soc-2013-paint/source/blender/render/intern/source/rayshade.c
    branches/soc-2013-paint/source/blender/render/intern/source/render_texture.c
    branches/soc-2013-paint/source/blender/render/intern/source/shadbuf.c
    branches/soc-2013-paint/source/blender/render/intern/source/strand.c
    branches/soc-2013-paint/source/blender/render/intern/source/zbuf.c
    branches/soc-2013-paint/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
    branches/soc-2013-paint/source/gameengine/Ketsji/KX_Camera.cpp
    branches/soc-2013-paint/source/gameengine/Ketsji/KX_Camera.h
    branches/soc-2013-paint/source/gameengine/Ketsji/KX_MeshProxy.cpp

Added Paths:
-----------
    branches/soc-2013-paint/source/blender/compositor/operations/COM_SplitOperation.cpp
    branches/soc-2013-paint/source/blender/compositor/operations/COM_SplitOperation.h

Removed Paths:
-------------
    branches/soc-2013-paint/source/blender/compositor/operations/COM_SplitViewerOperation.cpp
    branches/soc-2013-paint/source/blender/compositor/operations/COM_SplitViewerOperation.h
    branches/soc-2013-paint/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
    branches/soc-2013-paint/source/blender/compositor/operations/COM_ViewerBaseOperation.h

Modified: branches/soc-2013-paint/CMakeLists.txt
===================================================================
--- branches/soc-2013-paint/CMakeLists.txt	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/CMakeLists.txt	2013-08-08 09:47:47 UTC (rev 59020)
@@ -416,6 +416,10 @@
 	set(WITH_HEADLESS ON)
 endif()
 
+if(NOT WITH_PYTHON)
+	set(WITH_CYCLES OFF)
+endif()
+
 # enable boost for cycles, booleans, audaspace or i18n
 # otherwise if the user disabled
 if(NOT WITH_BOOST)

Modified: branches/soc-2013-paint/build_files/cmake/cmake_static_check_smatch.py
===================================================================
--- branches/soc-2013-paint/build_files/cmake/cmake_static_check_smatch.py	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/build_files/cmake/cmake_static_check_smatch.py	2013-08-08 09:47:47 UTC (rev 59020)
@@ -44,6 +44,7 @@
 
 def main():
     source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
+    source_defines = project_source_info.build_defines_as_args()
 
     check_commands = []
     for c, inc_dirs, defs in source_info:
@@ -52,7 +53,8 @@
                CHECKER_ARGS +
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
-               [("-D%s" % d) for d in defs]
+               [("-D%s" % d) for d in defs] +
+               source_defines
                )
 
         check_commands.append((c, cmd))

Modified: branches/soc-2013-paint/build_files/cmake/cmake_static_check_sparse.py
===================================================================
--- branches/soc-2013-paint/build_files/cmake/cmake_static_check_sparse.py	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/build_files/cmake/cmake_static_check_sparse.py	2013-08-08 09:47:47 UTC (rev 59020)
@@ -42,6 +42,7 @@
 
 def main():
     source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
+    source_defines = project_source_info.build_defines_as_args()
 
     check_commands = []
     for c, inc_dirs, defs in source_info:
@@ -50,7 +51,8 @@
                CHECKER_ARGS +
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
-               [("-D%s" % d) for d in defs]
+               [("-D%s" % d) for d in defs] +
+               source_defines
                )
 
         check_commands.append((c, cmd))

Modified: branches/soc-2013-paint/build_files/cmake/project_source_info.py
===================================================================
--- branches/soc-2013-paint/build_files/cmake/project_source_info.py	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/build_files/cmake/project_source_info.py	2013-08-08 09:47:47 UTC (rev 59020)
@@ -171,6 +171,26 @@
     return source
 
 
+def build_defines_as_source():
+    """
+    Returns a string formatted as an include:
+        '#defines A=B\n#define....'
+    """
+    import subprocess
+    # works for both gcc and clang
+    cmd = (cmake_cache_var("CMAKE_C_COMPILER"), "-dM", "-E", "-")
+    return subprocess.Popen(cmd,
+                            stdout=subprocess.PIPE,
+                            stdin=subprocess.DEVNULL,
+                            ).stdout.read().strip().decode('ascii')
+
+
+def build_defines_as_args():
+    return [("-D" + "=".join(l.split(maxsplit=2)[1:]))
+            for l in build_defines_as_source().split("\n")
+            if l.startswith('#define')]
+
+
 # could be moved elsewhere!, this just happens to be used by scripts that also
 # use this module.
 def queue_processes(process_funcs, job_total=-1):

Modified: branches/soc-2013-paint/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst
===================================================================
--- branches/soc-2013-paint/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/doc/python_api/rst/bge_types/bge.types.KX_Camera.rst	2013-08-08 09:47:47 UTC (rev 59020)
@@ -27,6 +27,12 @@
 
       :type: float
 
+   .. attribute:: fov
+
+      The camera's field of view value.
+
+      :type: float
+
    .. attribute:: ortho_scale
 
       The camera's view scale when in orthographic mode.

Modified: branches/soc-2013-paint/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/blender/blender_object.cpp	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/intern/cycles/blender/blender_object.cpp	2013-08-08 09:47:47 UTC (rev 59020)
@@ -348,32 +348,41 @@
 
 	bool hair_present = false;
 	bool show_emitter = false;
-	bool hide = false;
+	bool hide_as_dupli_parent = false;
+	bool hide_as_dupli_child_original = false;
 
 	for(b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); ++b_psys) {
 		if((b_psys->settings().render_type() == BL::ParticleSettings::render_type_PATH) &&
 		   (b_psys->settings().type()==BL::ParticleSettings::type_HAIR))
 			hair_present = true;
 
-		if(b_psys->settings().use_render_emitter()) {
-			hide = false;
+		if(b_psys->settings().use_render_emitter())
 			show_emitter = true;
-		}
 	}
 
 	/* duplicators hidden by default, except dupliframes which duplicate self */
 	if(b_ob.is_duplicator())
 		if(top_level || b_ob.dupli_type() != BL::Object::dupli_type_FRAMES)
-			hide = true;
+			hide_as_dupli_parent = true;
 
 	/* hide original object for duplis */
 	BL::Object parent = b_ob.parent();
 	if(parent && object_render_hide_original(b_ob.type(), parent.dupli_type()))
 		if(parent_hide)
-			hide = true;
-
-	hide_triangles = (hair_present && !show_emitter);
-	return hide && !show_emitter;
+			hide_as_dupli_child_original = true;
+	
+	if(show_emitter) {
+		hide_triangles = false;
+		return (hide_as_dupli_parent || hide_as_dupli_child_original);
+	}
+	else if(hair_present) {
+		hide_triangles = true;
+		return hide_as_dupli_child_original;
+	}
+	else {
+		hide_triangles = false;
+		return (hide_as_dupli_parent || hide_as_dupli_child_original);
+	}
 }
 
 static bool object_render_hide_duplis(BL::Object b_ob)

Modified: branches/soc-2013-paint/intern/cycles/kernel/kernel_types.h
===================================================================
--- branches/soc-2013-paint/intern/cycles/kernel/kernel_types.h	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/intern/cycles/kernel/kernel_types.h	2013-08-08 09:47:47 UTC (rev 59020)
@@ -44,11 +44,11 @@
 #define BSSRDF_MIN_RADIUS			1e-8f
 #define BSSRDF_MAX_ATTEMPTS			8
 
-#define BB_DRAPPER				800.0
-#define BB_MAX_TABLE_RANGE		12000.0
-#define BB_TABLE_XPOWER			1.5
-#define BB_TABLE_YPOWER			5.0
-#define BB_TABLE_SPACING		2.0
+#define BB_DRAPPER				800.0f
+#define BB_MAX_TABLE_RANGE		12000.0f
+#define BB_TABLE_XPOWER			1.5f
+#define BB_TABLE_YPOWER			5.0f
+#define BB_TABLE_SPACING		2.0f
 
 #define TEX_NUM_FLOAT_IMAGES	5
 

Modified: branches/soc-2013-paint/intern/cycles/kernel/svm/svm_blackbody.h
===================================================================
--- branches/soc-2013-paint/intern/cycles/kernel/svm/svm_blackbody.h	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/intern/cycles/kernel/svm/svm_blackbody.h	2013-08-08 09:47:47 UTC (rev 59020)
@@ -53,7 +53,7 @@
 
 		/* reconstruct a proper index for the table lookup, compared to OSL we don't look up two colors
 		just one (the OSL-lerp is also automatically done for us by "lookup_table_read") */
-		float t = powf((temperature - BB_DRAPPER) * (1.0f / BB_TABLE_SPACING), 1.0f/BB_TABLE_XPOWER);
+		float t = powf((temperature - BB_DRAPPER) * (1.0f / BB_TABLE_SPACING), (1.0f / BB_TABLE_XPOWER));
 
 		int blackbody_table_offset = kernel_data.blackbody.table_offset;
 

Modified: branches/soc-2013-paint/intern/cycles/render/blackbody.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/render/blackbody.cpp	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/intern/cycles/render/blackbody.cpp	2013-08-08 09:47:47 UTC (rev 59020)
@@ -91,7 +91,7 @@
 	const double c1 = 3.74183e-16; // 2*pi*h*c^2, W*m^2
 	const double c2 = 1.4388e-2;   // h*c/k, m*K
 								   // h is Planck's const, k is Boltzmann's
-	const float dlambda = 5.0f * 1e-9;  // in meters
+	const float dlambda = 5.0f * 1e-9f;  // in meters
 
 	/* Blackbody table from 800 to 12k Kelvin (319 entries (317+2 offset) * 3) */
 	vector<float> blackbody_table(956);
@@ -100,7 +100,7 @@
 
 	/* ToDo: bring this back to what OSL does with the lastTemperature limit ? */
 	for (int i = 0;  i <= 317;  ++i) {
-		float Temperature = powf (float(i), BB_TABLE_XPOWER) * BB_TABLE_SPACING + BB_DRAPPER;
+		double Temperature = pow((double)i, (double)BB_TABLE_XPOWER) * (double)BB_TABLE_SPACING + (double)BB_DRAPPER;
 		X = 0;
 		Y = 0;
 		Z = 0;
@@ -108,10 +108,10 @@
 		/* from OSL "spectrum_to_XYZ" */
 		for (int n = 0; n < 81; ++n) {
 			float lambda = 380.0f + 5.0f * n;
-			double wlm = lambda * 1e-9;   // Wavelength in meters
+			double wlm = lambda * 1e-9f;   // Wavelength in meters
 			// N.B. spec_intens returns result in W/m^2 but it's a differential,
 			// needs to be scaled by dlambda!
-			float spec_intens = float((c1 * powf(wlm,-5.0)) / (expf(c2 / (wlm * Temperature)) -1.0f));
+			float spec_intens = float((c1 * pow(wlm, -5.0)) / (exp(c2 / (wlm * Temperature)) -1.0));
 			float Me = spec_intens * dlambda;
 
 			X += Me * cie_colour_match[n][0];

Modified: branches/soc-2013-paint/intern/dualcon/intern/octree.cpp
===================================================================
--- branches/soc-2013-paint/intern/dualcon/intern/octree.cpp	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/intern/dualcon/intern/octree.cpp	2013-08-08 09:47:47 UTC (rev 59020)
@@ -2182,7 +2182,7 @@
 			ata[4] += (float)(norm[1] * norm[2]);
 			ata[5] += (float)(norm[2] * norm[2]);
 
-			double pn = p[0] * norm[0] + p[1] * norm[1] + p[2] * norm[2];
+			const float pn = p[0] * norm[0] + p[1] * norm[1] + p[2] * norm[2];
 
 			atb[0] += (float)(norm[0] * pn);
 			atb[1] += (float)(norm[1] * pn);

Modified: branches/soc-2013-paint/intern/guardedalloc/MEM_guardedalloc.h
===================================================================
--- branches/soc-2013-paint/intern/guardedalloc/MEM_guardedalloc.h	2013-08-08 09:45:59 UTC (rev 59019)
+++ branches/soc-2013-paint/intern/guardedalloc/MEM_guardedalloc.h	2013-08-08 09:47:47 UTC (rev 59020)
@@ -98,6 +98,7 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list