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

Antony Riakiotakis kalast at gmail.com
Thu Jul 11 19:56:30 CEST 2013


Revision: 58181
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58181
Author:   psy-fi
Date:     2013-07-11 17:56:30 +0000 (Thu, 11 Jul 2013)
Log Message:
-----------
Merge trunk -r58180 into soc-2013-paint

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

Modified Paths:
--------------
    branches/soc-2013-paint/build_files/cmake/Modules/FindPythonLibsUnix.cmake
    branches/soc-2013-paint/intern/cycles/CMakeLists.txt
    branches/soc-2013-paint/intern/cycles/blender/addon/__init__.py
    branches/soc-2013-paint/intern/cycles/blender/blender_mesh.cpp
    branches/soc-2013-paint/intern/cycles/blender/blender_object.cpp
    branches/soc-2013-paint/intern/cycles/kernel/kernel_camera.h
    branches/soc-2013-paint/intern/cycles/render/buffers.cpp
    branches/soc-2013-paint/intern/cycles/render/graph.cpp
    branches/soc-2013-paint/intern/cycles/util/util_math.h
    branches/soc-2013-paint/release/scripts/freestyle/style_modules/parameter_editor.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/__init__.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/space_userpref.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d.py
    branches/soc-2013-paint/source/blender/blenkernel/BKE_DerivedMesh.h
    branches/soc-2013-paint/source/blender/blenkernel/BKE_scene.h
    branches/soc-2013-paint/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/customdata.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/editderivedmesh.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/mball.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/particle.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/scene.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/text.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/unit.c
    branches/soc-2013-paint/source/blender/blenlib/BLI_math_vector.h
    branches/soc-2013-paint/source/blender/blenlib/BLI_string_utf8.h
    branches/soc-2013-paint/source/blender/blenlib/BLI_threads.h
    branches/soc-2013-paint/source/blender/blenlib/intern/math_geom.c
    branches/soc-2013-paint/source/blender/blenlib/intern/math_matrix.c
    branches/soc-2013-paint/source/blender/blenlib/intern/math_vector.c
    branches/soc-2013-paint/source/blender/blenlib/intern/string_utf8.c
    branches/soc-2013-paint/source/blender/blenlib/intern/threads.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/CMakeLists.txt
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_construct.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_construct.h
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_core.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_core.h
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_interp.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_mesh.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_mods.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_opdefines.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_operators.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_queries.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_queries.h
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_bridge.c
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_utils.c
    branches/soc-2013-paint/source/blender/bmesh/tools/bmesh_bevel.c
    branches/soc-2013-paint/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp
    branches/soc-2013-paint/source/blender/editors/armature/armature_relations.c
    branches/soc-2013-paint/source/blender/editors/armature/armature_utils.c
    branches/soc-2013-paint/source/blender/editors/curve/editcurve.c
    branches/soc-2013-paint/source/blender/editors/include/ED_mesh.h
    branches/soc-2013-paint/source/blender/editors/include/ED_render.h
    branches/soc-2013-paint/source/blender/editors/include/UI_interface.h
    branches/soc-2013-paint/source/blender/editors/interface/interface.c
    branches/soc-2013-paint/source/blender/editors/interface/interface_handlers.c
    branches/soc-2013-paint/source/blender/editors/interface/interface_layout.c
    branches/soc-2013-paint/source/blender/editors/interface/interface_regions.c
    branches/soc-2013-paint/source/blender/editors/interface/interface_templates.c
    branches/soc-2013-paint/source/blender/editors/mesh/editface.c
    branches/soc-2013-paint/source/blender/editors/mesh/editmesh_loopcut.c
    branches/soc-2013-paint/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2013-paint/source/blender/editors/mesh/editmesh_utils.c
    branches/soc-2013-paint/source/blender/editors/mesh/meshtools.c
    branches/soc-2013-paint/source/blender/editors/object/object_add.c
    branches/soc-2013-paint/source/blender/editors/object/object_vgroup.c
    branches/soc-2013-paint/source/blender/editors/physics/particle_edit.c
    branches/soc-2013-paint/source/blender/editors/render/render_intern.h
    branches/soc-2013-paint/source/blender/editors/render/render_internal.c
    branches/soc-2013-paint/source/blender/editors/render/render_preview.c
    branches/soc-2013-paint/source/blender/editors/render/render_update.c
    branches/soc-2013-paint/source/blender/editors/screen/area.c
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_image_proj.c
    branches/soc-2013-paint/source/blender/editors/space_node/node_edit.c
    branches/soc-2013-paint/source/blender/editors/space_node/space_node.c
    branches/soc-2013-paint/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2013-paint/source/blender/editors/transform/transform.c
    branches/soc-2013-paint/source/blender/editors/transform/transform.h
    branches/soc-2013-paint/source/blender/editors/util/undo.c
    branches/soc-2013-paint/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
    branches/soc-2013-paint/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
    branches/soc-2013-paint/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
    branches/soc-2013-paint/source/blender/freestyle/intern/stroke/Canvas.h
    branches/soc-2013-paint/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
    branches/soc-2013-paint/source/blender/freestyle/intern/stroke/ContextFunctions.h
    branches/soc-2013-paint/source/blender/freestyle/intern/view_map/ViewMap.cpp
    branches/soc-2013-paint/source/blender/imbuf/intern/tiff.c
    branches/soc-2013-paint/source/blender/makesdna/DNA_curve_types.h
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_access.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_mesh.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_object.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_render.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_space.c
    branches/soc-2013-paint/source/blender/python/bmesh/bmesh_py_types.c
    branches/soc-2013-paint/source/blender/python/generic/idprop_py_api.c
    branches/soc-2013-paint/source/blender/python/intern/bpy_rna_array.c
    branches/soc-2013-paint/source/blender/render/extern/include/RE_engine.h
    branches/soc-2013-paint/source/blender/render/extern/include/RE_pipeline.h
    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/external_engine.c
    branches/soc-2013-paint/source/blender/render/intern/source/pipeline.c
    branches/soc-2013-paint/source/blender/windowmanager/WM_api.h
    branches/soc-2013-paint/source/blender/windowmanager/intern/wm_jobs.c
    branches/soc-2013-paint/source/blender/windowmanager/intern/wm_operators.c

Added Paths:
-----------
    branches/soc-2013-paint/release/scripts/modules/rna_keymap_ui.py
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_normals.c

Removed Paths:
-------------
    branches/soc-2013-paint/release/scripts/startup/bl_ui/space_userpref_keymap.py

Modified: branches/soc-2013-paint/build_files/cmake/Modules/FindPythonLibsUnix.cmake
===================================================================
--- branches/soc-2013-paint/build_files/cmake/Modules/FindPythonLibsUnix.cmake	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/build_files/cmake/Modules/FindPythonLibsUnix.cmake	2013-07-11 17:56:30 UTC (rev 58181)
@@ -2,10 +2,12 @@
 # Find the native Python includes and library
 #
 # Note:, This is not _yet_ intended to be a general python module for other
-#  projects to use since its hard coded to python 3.2 as blender only supports
-#  a single python version.
-#  This is for blender/unix python only.
+#  projects to use since its hard coded to fixed Python version
+#  as Blender only supports a single Python version at the moment.
 #
+# Note:
+#  this is for Blender/Unix Python only.
+#
 # This module defines
 #  PYTHON_VERSION
 #  PYTHON_INCLUDE_DIRS

Modified: branches/soc-2013-paint/intern/cycles/CMakeLists.txt
===================================================================
--- branches/soc-2013-paint/intern/cycles/CMakeLists.txt	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/intern/cycles/CMakeLists.txt	2013-07-11 17:56:30 UTC (rev 58181)
@@ -25,6 +25,10 @@
 	set(CYCLES_SSE2_KERNEL_FLAGS "-ffast-math -msse -msse2 -mfpmath=sse")
 	set(CYCLES_SSE3_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3 -mfpmath=sse")
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+	set(CYCLES_SSE2_KERNEL_FLAGS "-ffast-math -msse -msse2")
+	set(CYCLES_SSE3_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math")
 endif()
 
 # for OSL

Modified: branches/soc-2013-paint/intern/cycles/blender/addon/__init__.py
===================================================================
--- branches/soc-2013-paint/intern/cycles/blender/addon/__init__.py	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/intern/cycles/blender/addon/__init__.py	2013-07-11 17:56:30 UTC (rev 58181)
@@ -41,6 +41,7 @@
     bl_use_shading_nodes = True
     bl_use_preview = True
     bl_use_exclude_layers = True
+    bl_use_save_buffers = True
 
     def __init__(self):
         self.session = None

Modified: branches/soc-2013-paint/intern/cycles/blender/blender_mesh.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/blender/blender_mesh.cpp	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/intern/cycles/blender/blender_mesh.cpp	2013-07-11 17:56:30 UTC (rev 58181)
@@ -462,6 +462,9 @@
 	mesh->name = ustring(b_ob_data.name().c_str());
 
 	if(render_layer.use_surfaces || render_layer.use_hair) {
+		if(preview)
+			b_ob.update_from_editmode();
+
 		BL::Mesh b_mesh = object_to_mesh(b_data, b_ob, b_scene, true, !preview, need_undeformed);
 
 		if(b_mesh) {

Modified: branches/soc-2013-paint/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/blender/blender_object.cpp	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/intern/cycles/blender/blender_object.cpp	2013-07-11 17:56:30 UTC (rev 58181)
@@ -304,7 +304,7 @@
 		}
 
 		if (b_dupli_ob) {
-			object->dupli_generated = get_float3(b_dupli_ob.orco());
+			object->dupli_generated = 0.5f*get_float3(b_dupli_ob.orco()) - make_float3(0.5f, 0.5f, 0.5f);
 			object->dupli_uv = get_float2(b_dupli_ob.uv());
 		}
 		else {

Modified: branches/soc-2013-paint/intern/cycles/kernel/kernel_camera.h
===================================================================
--- branches/soc-2013-paint/intern/cycles/kernel/kernel_camera.h	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/intern/cycles/kernel/kernel_camera.h	2013-07-11 17:56:30 UTC (rev 58181)
@@ -166,6 +166,12 @@
 
 	ray->D = panorama_to_direction(kg, Pcamera.x, Pcamera.y);
 
+	/* indicates ray should not receive any light, outside of the lens */
+	if(is_zero(ray->D)) {	
+		ray->t = 0.0f;
+		return;
+	}
+
 	/* modify ray for depth of field */
 	float aperturesize = kernel_data.cam.aperturesize;
 
@@ -186,12 +192,6 @@
 		ray->D = normalize(Pfocus - ray->P);
 	}
 
-	/* indicates ray should not receive any light, outside of the lens */
-	if(is_zero(ray->D)) {	
-		ray->t = 0.0f;
-		return;
-	}
-
 	/* transform ray from camera to world */
 	Transform cameratoworld = kernel_data.cam.cameratoworld;
 

Modified: branches/soc-2013-paint/intern/cycles/render/buffers.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/render/buffers.cpp	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/intern/cycles/render/buffers.cpp	2013-07-11 17:56:30 UTC (rev 58181)
@@ -223,7 +223,7 @@
 					float3 f = make_float3(in[0], in[1], in[2]);
 					float3 f_divide = make_float3(in_divide[0], in_divide[1], in_divide[2]);
 
-					f = safe_divide_color(f*exposure, f_divide);
+					f = safe_divide_even_color(f*exposure, f_divide);
 
 					pixels[0] = f.x;
 					pixels[1] = f.y;

Modified: branches/soc-2013-paint/intern/cycles/render/graph.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/render/graph.cpp	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/intern/cycles/render/graph.cpp	2013-07-11 17:56:30 UTC (rev 58181)
@@ -347,8 +347,9 @@
 
 					if(tonode->special_type == SHADER_SPECIAL_TYPE_AUTOCONVERT) {
 						bool all_links_removed = true;
+						vector<ShaderInput*> links = tonode->outputs[0]->links;
 
-						foreach(ShaderInput *autoin, tonode->outputs[0]->links) {
+						foreach(ShaderInput *autoin, links) {
 							if(autoin->default_value == ShaderInput::NONE)
 								all_links_removed = false;
 							else

Modified: branches/soc-2013-paint/intern/cycles/util/util_math.h
===================================================================
--- branches/soc-2013-paint/intern/cycles/util/util_math.h	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/intern/cycles/util/util_math.h	2013-07-11 17:56:30 UTC (rev 58181)
@@ -1100,6 +1100,42 @@
 	return make_float3(x, y, z);
 }
 
+__device_inline float3 safe_divide_even_color(float3 a, float3 b)
+{
+	float x, y, z;
+
+	x = (b.x != 0.0f)? a.x/b.x: 0.0f;
+	y = (b.y != 0.0f)? a.y/b.y: 0.0f;
+	z = (b.z != 0.0f)? a.z/b.z: 0.0f;
+
+	/* try to get grey even if b is zero */
+	if(b.x == 0.0f) {
+		if(b.y == 0.0f) {
+			x = z;
+			y = z;
+		}
+		else if(b.z == 0.0f) {
+			x = y;
+			z = y;
+		}
+		else
+			x = 0.5f*(y + z);
+	}
+	else if(b.y == 0.0f) {
+		if(b.z == 0.0f) {
+			y = x;
+			z = x;
+		}
+		else
+			y = 0.5f*(x + z);
+	}
+	else if(b.z == 0.0f) {
+		z = 0.5f*(x + y);
+	}
+
+	return make_float3(x, y, z);
+}
+
 /* Rotation of point around axis and angle */
 
 __device_inline float3 rotate_around_axis(float3 p, float3 axis, float angle)

Modified: branches/soc-2013-paint/release/scripts/freestyle/style_modules/parameter_editor.py
===================================================================
--- branches/soc-2013-paint/release/scripts/freestyle/style_modules/parameter_editor.py	2013-07-11 17:25:18 UTC (rev 58180)
+++ branches/soc-2013-paint/release/scripts/freestyle/style_modules/parameter_editor.py	2013-07-11 17:56:30 UTC (rev 58181)
@@ -32,7 +32,7 @@
     FalseBP1D, FalseUP1D, GuidingLinesShader, Interface0DIterator, Nature, Noise, Normal2DF0D, Operators, \
     PolygonalizationShader, QuantitativeInvisibilityF1D, QuantitativeInvisibilityUP1D, SamplingShader, \
     SpatialNoiseShader, StrokeAttribute, StrokeShader, TipRemoverShader, TrueBP1D, TrueUP1D, UnaryPredicate0D, \
-    UnaryPredicate1D, VertexOrientation2DF0D, WithinImageBoundaryUP1D
+    UnaryPredicate1D, VertexOrientation2DF0D, WithinImageBoundaryUP1D, ContextFunctions
 from Functions0D import CurveMaterialF0D
 from PredicatesU1D import pyNatureUP1D
 from logical_operators import AndUP1D, NotUP1D, OrUP1D
@@ -1046,17 +1046,7 @@
             selection_criteria.append(upred)
     # prepare selection criteria by image border
     if lineset.select_by_image_border:
-        fac = scene.render.resolution_percentage / 100.0
-        w = scene.render.resolution_x * fac
-        h = scene.render.resolution_y * fac
-        if scene.render.use_border:
-            xmin = scene.render.border_min_x * w
-            xmax = scene.render.border_max_x * w
-            ymin = scene.render.border_min_y * h
-            ymax = scene.render.border_max_y * h
-        else:
-            xmin, xmax = 0.0, float(w)
-            ymin, ymax = 0.0, float(h)
+        xmin, ymin, xmax, ymax = ContextFunctions.get_border()
         upred = WithinImageBoundaryUP1D(xmin, ymin, xmax, ymax)
         selection_criteria.append(upred)
     # select feature edges

Added: branches/soc-2013-paint/release/scripts/modules/rna_keymap_ui.py
===================================================================
--- branches/soc-2013-paint/release/scripts/modules/rna_keymap_ui.py	                        (rev 0)
+++ branches/soc-2013-paint/release/scripts/modules/rna_keymap_ui.py	2013-07-11 17:56:30 UTC (rev 58181)
@@ -0,0 +1,384 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
+__all__ = (
+    "draw_entry",
+    "draw_km",
+    "draw_kmi",
+    "draw_filtered",
+    "draw_hierarchy",
+    "draw_keymaps",
+    )
+
+
+import bpy
+from bpy.app.translations import pgettext_iface as iface_
+from bpy.app.translations import contexts as i18n_contexts
+
+
+def _indented_layout(layout, level):
+    indentpx = 16
+    if level == 0:

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list