[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58093] branches/soc-2013-dingto: Merged revision(s) 58059-58092 from trunk/blender into soc-2013-dingto.

Thomas Dinges blender at dingto.org
Tue Jul 9 02:58:26 CEST 2013


Revision: 58093
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58093
Author:   dingto
Date:     2013-07-09 00:58:25 +0000 (Tue, 09 Jul 2013)
Log Message:
-----------
Merged revision(s) 58059-58092 from trunk/blender into soc-2013-dingto. 

Modified Paths:
--------------
    branches/soc-2013-dingto/intern/cycles/CMakeLists.txt
    branches/soc-2013-dingto/intern/cycles/blender/blender_mesh.cpp
    branches/soc-2013-dingto/intern/cycles/render/buffers.cpp
    branches/soc-2013-dingto/intern/cycles/util/util_math.h
    branches/soc-2013-dingto/release/scripts/freestyle/style_modules/parameter_editor.py
    branches/soc-2013-dingto/release/scripts/startup/bl_ui/__init__.py
    branches/soc-2013-dingto/release/scripts/startup/bl_ui/space_userpref.py
    branches/soc-2013-dingto/release/scripts/startup/bl_ui/space_view3d.py
    branches/soc-2013-dingto/source/blender/blenlib/BLI_threads.h
    branches/soc-2013-dingto/source/blender/blenlib/intern/threads.c
    branches/soc-2013-dingto/source/blender/blenloader/intern/readfile.c
    branches/soc-2013-dingto/source/blender/bmesh/CMakeLists.txt
    branches/soc-2013-dingto/source/blender/bmesh/intern/bmesh_opdefines.c
    branches/soc-2013-dingto/source/blender/bmesh/intern/bmesh_queries.c
    branches/soc-2013-dingto/source/blender/bmesh/intern/bmesh_queries.h
    branches/soc-2013-dingto/source/blender/bmesh/operators/bmo_utils.c
    branches/soc-2013-dingto/source/blender/bmesh/tools/bmesh_bevel.c
    branches/soc-2013-dingto/source/blender/editors/curve/editcurve.c
    branches/soc-2013-dingto/source/blender/editors/include/ED_render.h
    branches/soc-2013-dingto/source/blender/editors/interface/interface_templates.c
    branches/soc-2013-dingto/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2013-dingto/source/blender/editors/render/render_intern.h
    branches/soc-2013-dingto/source/blender/editors/render/render_internal.c
    branches/soc-2013-dingto/source/blender/editors/render/render_update.c
    branches/soc-2013-dingto/source/blender/editors/screen/area.c
    branches/soc-2013-dingto/source/blender/editors/sculpt_paint/paint_image_proj.c
    branches/soc-2013-dingto/source/blender/editors/space_node/node_edit.c
    branches/soc-2013-dingto/source/blender/editors/space_node/space_node.c
    branches/soc-2013-dingto/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2013-dingto/source/blender/editors/util/undo.c
    branches/soc-2013-dingto/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp
    branches/soc-2013-dingto/source/blender/freestyle/intern/stroke/Canvas.h
    branches/soc-2013-dingto/source/blender/freestyle/intern/stroke/ContextFunctions.cpp
    branches/soc-2013-dingto/source/blender/freestyle/intern/stroke/ContextFunctions.h
    branches/soc-2013-dingto/source/blender/makesrna/intern/rna_access.c
    branches/soc-2013-dingto/source/blender/python/generic/idprop_py_api.c
    branches/soc-2013-dingto/source/blender/python/intern/bpy_rna_array.c
    branches/soc-2013-dingto/source/blender/render/extern/include/RE_engine.h
    branches/soc-2013-dingto/source/blender/render/extern/include/RE_pipeline.h
    branches/soc-2013-dingto/source/blender/render/intern/source/convertblender.c
    branches/soc-2013-dingto/source/blender/render/intern/source/pipeline.c
    branches/soc-2013-dingto/source/blender/windowmanager/WM_api.h
    branches/soc-2013-dingto/source/blender/windowmanager/intern/wm_jobs.c
    branches/soc-2013-dingto/source/blender/windowmanager/intern/wm_operators.c

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

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

Property Changed:
----------------
    branches/soc-2013-dingto/


Property changes on: branches/soc-2013-dingto
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57315-57365,57369-58058
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57315-57365,57369-58092

Modified: branches/soc-2013-dingto/intern/cycles/CMakeLists.txt
===================================================================
--- branches/soc-2013-dingto/intern/cycles/CMakeLists.txt	2013-07-09 00:48:46 UTC (rev 58092)
+++ branches/soc-2013-dingto/intern/cycles/CMakeLists.txt	2013-07-09 00:58:25 UTC (rev 58093)
@@ -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-dingto/intern/cycles/blender/blender_mesh.cpp
===================================================================
--- branches/soc-2013-dingto/intern/cycles/blender/blender_mesh.cpp	2013-07-09 00:48:46 UTC (rev 58092)
+++ branches/soc-2013-dingto/intern/cycles/blender/blender_mesh.cpp	2013-07-09 00:58:25 UTC (rev 58093)
@@ -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-dingto/intern/cycles/render/buffers.cpp
===================================================================
--- branches/soc-2013-dingto/intern/cycles/render/buffers.cpp	2013-07-09 00:48:46 UTC (rev 58092)
+++ branches/soc-2013-dingto/intern/cycles/render/buffers.cpp	2013-07-09 00:58:25 UTC (rev 58093)
@@ -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-dingto/intern/cycles/util/util_math.h
===================================================================
--- branches/soc-2013-dingto/intern/cycles/util/util_math.h	2013-07-09 00:48:46 UTC (rev 58092)
+++ branches/soc-2013-dingto/intern/cycles/util/util_math.h	2013-07-09 00:58:25 UTC (rev 58093)
@@ -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-dingto/release/scripts/freestyle/style_modules/parameter_editor.py
===================================================================
--- branches/soc-2013-dingto/release/scripts/freestyle/style_modules/parameter_editor.py	2013-07-09 00:48:46 UTC (rev 58092)
+++ branches/soc-2013-dingto/release/scripts/freestyle/style_modules/parameter_editor.py	2013-07-09 00:58:25 UTC (rev 58093)
@@ -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

Copied: branches/soc-2013-dingto/release/scripts/modules/rna_keymap_ui.py (from rev 58092, trunk/blender/release/scripts/modules/rna_keymap_ui.py)
===================================================================
--- branches/soc-2013-dingto/release/scripts/modules/rna_keymap_ui.py	                        (rev 0)
+++ branches/soc-2013-dingto/release/scripts/modules/rna_keymap_ui.py	2013-07-09 00:58:25 UTC (rev 58093)
@@ -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:
+        level = 0.0001   # Tweak so that a percentage of 0 won't split by half
+    indent = level * indentpx / bpy.context.region.width
+
+    split = layout.split(percentage=indent)
+    col = split.column()
+    col = split.column()
+    return col
+
+
+def draw_entry(display_keymaps, entry, col, level=0):
+    idname, spaceid, regionid, children = entry
+
+    for km, kc in display_keymaps:
+        if km.name == idname and km.space_type == spaceid and km.region_type == regionid:
+            draw_km(display_keymaps, kc, km, children, col, level)
+
+    '''
+    km = kc.keymaps.find(idname, space_type=spaceid, region_type=regionid)
+    if not km:
+        kc = defkc
+        km = kc.keymaps.find(idname, space_type=spaceid, region_type=regionid)
+
+    if km:
+        draw_km(kc, km, children, col, level)
+    '''
+
+
+def draw_km(display_keymaps, kc, km, children, layout, level):
+    km = km.active()
+
+    layout.context_pointer_set("keymap", km)
+
+    col = _indented_layout(layout, level)
+
+    row = col.row()
+    row.prop(km, "show_expanded_children", text="", emboss=False)
+    row.label(text=km.name, text_ctxt=i18n_contexts.id_windowmanager)
+
+    row.label()
+    row.label()
+
+    if km.is_modal:
+        row.label(text="", icon='LINKED')
+    if km.is_user_modified:
+        row.operator("wm.keymap_restore", text="Restore")
+    else:
+        row.label()
+
+    if km.show_expanded_children:
+        if children:
+            # Put the Parent key map's entries in a 'global' sub-category
+            # equal in hierarchy to the other children categories
+            subcol = _indented_layout(col, level + 1)
+            subrow = subcol.row()
+            subrow.prop(km, "show_expanded_items", text="", emboss=False)
+            subrow.label(text=iface_("%s (Global)") % km.name, translate=False)
+        else:
+            km.show_expanded_items = True
+
+        # Key Map items
+        if km.show_expanded_items:
+            for kmi in km.keymap_items:

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list