[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58112] branches/soc-2013-depsgraph_mt: Merging r58073 through r58111 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin
sergey.vfx at gmail.com
Tue Jul 9 10:44:06 CEST 2013
Revision: 58112
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58112
Author: nazgul
Date: 2013-07-09 08:44:06 +0000 (Tue, 09 Jul 2013)
Log Message:
-----------
Merging r58073 through r58111 from trunk into soc-2013-depsgraph_mt
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58073
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58111
Modified Paths:
--------------
branches/soc-2013-depsgraph_mt/intern/cycles/blender/blender_mesh.cpp
branches/soc-2013-depsgraph_mt/intern/cycles/render/buffers.cpp
branches/soc-2013-depsgraph_mt/intern/cycles/util/util_math.h
branches/soc-2013-depsgraph_mt/release/scripts/startup/bl_ui/space_userpref.py
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/BKE_scene.h
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/mball.c
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/scene.c
branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/text.c
branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_string_utf8.h
branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_threads.h
branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/string_utf8.c
branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/threads.c
branches/soc-2013-depsgraph_mt/source/blender/blenloader/intern/readfile.c
branches/soc-2013-depsgraph_mt/source/blender/blenloader/intern/writefile.c
branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_queries.c
branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_queries.h
branches/soc-2013-depsgraph_mt/source/blender/bmesh/operators/bmo_normals.c
branches/soc-2013-depsgraph_mt/source/blender/bmesh/tools/bmesh_bevel.c
branches/soc-2013-depsgraph_mt/source/blender/editors/include/ED_render.h
branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface.c
branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface_regions.c
branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface_templates.c
branches/soc-2013-depsgraph_mt/source/blender/editors/mesh/editface.c
branches/soc-2013-depsgraph_mt/source/blender/editors/mesh/editmesh_tools.c
branches/soc-2013-depsgraph_mt/source/blender/editors/object/object_vgroup.c
branches/soc-2013-depsgraph_mt/source/blender/editors/render/render_intern.h
branches/soc-2013-depsgraph_mt/source/blender/editors/render/render_internal.c
branches/soc-2013-depsgraph_mt/source/blender/editors/render/render_update.c
branches/soc-2013-depsgraph_mt/source/blender/editors/screen/area.c
branches/soc-2013-depsgraph_mt/source/blender/editors/sculpt_paint/paint_image_proj.c
branches/soc-2013-depsgraph_mt/source/blender/editors/space_node/node_edit.c
branches/soc-2013-depsgraph_mt/source/blender/editors/space_node/space_node.c
branches/soc-2013-depsgraph_mt/source/blender/editors/space_view3d/drawobject.c
branches/soc-2013-depsgraph_mt/source/blender/editors/util/undo.c
branches/soc-2013-depsgraph_mt/source/blender/makesdna/DNA_curve_types.h
branches/soc-2013-depsgraph_mt/source/blender/makesrna/intern/rna_access.c
branches/soc-2013-depsgraph_mt/source/blender/python/generic/idprop_py_api.c
branches/soc-2013-depsgraph_mt/source/blender/render/extern/include/RE_engine.h
branches/soc-2013-depsgraph_mt/source/blender/render/extern/include/RE_pipeline.h
branches/soc-2013-depsgraph_mt/source/blender/render/intern/source/convertblender.c
branches/soc-2013-depsgraph_mt/source/blender/render/intern/source/pipeline.c
branches/soc-2013-depsgraph_mt/source/blender/windowmanager/WM_api.h
branches/soc-2013-depsgraph_mt/source/blender/windowmanager/intern/wm_jobs.c
Added Paths:
-----------
branches/soc-2013-depsgraph_mt/release/scripts/modules/rna_keymap_ui.py
Removed Paths:
-------------
branches/soc-2013-depsgraph_mt/release/scripts/startup/bl_ui/space_userpref_keymap.py
Property Changed:
----------------
branches/soc-2013-depsgraph_mt/
branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface.c
branches/soc-2013-depsgraph_mt/source/blender/editors/space_outliner/
Property changes on: branches/soc-2013-depsgraph_mt
___________________________________________________________________
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
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-58072
+ /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
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-58111
Modified: branches/soc-2013-depsgraph_mt/intern/cycles/blender/blender_mesh.cpp
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/blender/blender_mesh.cpp 2013-07-09 08:25:30 UTC (rev 58111)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/blender/blender_mesh.cpp 2013-07-09 08:44:06 UTC (rev 58112)
@@ -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-depsgraph_mt/intern/cycles/render/buffers.cpp
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/render/buffers.cpp 2013-07-09 08:25:30 UTC (rev 58111)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/render/buffers.cpp 2013-07-09 08:44:06 UTC (rev 58112)
@@ -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-depsgraph_mt/intern/cycles/util/util_math.h
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/util/util_math.h 2013-07-09 08:25:30 UTC (rev 58111)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/util/util_math.h 2013-07-09 08:44:06 UTC (rev 58112)
@@ -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)
Copied: branches/soc-2013-depsgraph_mt/release/scripts/modules/rna_keymap_ui.py (from rev 58111, trunk/blender/release/scripts/modules/rna_keymap_ui.py)
===================================================================
--- branches/soc-2013-depsgraph_mt/release/scripts/modules/rna_keymap_ui.py (rev 0)
+++ branches/soc-2013-depsgraph_mt/release/scripts/modules/rna_keymap_ui.py 2013-07-09 08:44:06 UTC (rev 58112)
@@ -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:
+ draw_kmi(display_keymaps, kc, km, kmi, col, level + 1)
+
+ # "Add New" at end of keymap item list
+ col = _indented_layout(col, level + 1)
+ subcol = col.split(percentage=0.2).column()
+ subcol.operator("wm.keyitem_add", text="Add New", text_ctxt=i18n_contexts.id_windowmanager,
+ icon='ZOOMIN')
+
+ col.separator()
+
+ # Child key maps
+ if children:
+ subcol = col.column()
+ row = subcol.row()
+
+ for entry in children:
+ draw_entry(display_keymaps, entry, col, level + 1)
+
+
+def draw_kmi(display_keymaps, kc, km, kmi, layout, level):
+ map_type = kmi.map_type
+
+ col = _indented_layout(layout, level)
+
+ if kmi.show_expanded:
+ col = col.column(align=True)
+ box = col.box()
+ else:
+ box = col.column()
+
+ split = box.split(percentage=0.05)
+
+ # header bar
+ row = split.row()
+ row.prop(kmi, "show_expanded", text="", emboss=False)
+
+ row = split.row()
+ row.prop(kmi, "active", text="", emboss=False)
+
+ if km.is_modal:
+ row.prop(kmi, "propvalue", text="")
+ else:
+ row.label(text=kmi.name)
+
+ row = split.row()
+ row.prop(kmi, "map_type", text="")
+ if map_type == 'KEYBOARD':
+ row.prop(kmi, "type", text="", full_event=True)
+ elif map_type == 'MOUSE':
+ row.prop(kmi, "type", text="", full_event=True)
+ elif map_type == 'NDOF':
+ row.prop(kmi, "type", text="", full_event=True)
+ elif map_type == 'TWEAK':
+ subrow = row.row()
+ subrow.prop(kmi, "type", text="")
+ subrow.prop(kmi, "value", text="")
+ elif map_type == 'TIMER':
+ row.prop(kmi, "type", text="")
+ else:
+ row.label()
+
+ if (not kmi.is_user_defined) and kmi.is_user_modified:
+ row.operator("wm.keyitem_restore", text="", icon='BACK').item_id = kmi.id
+ else:
+ row.operator("wm.keyitem_remove", text="", icon='X').item_id = kmi.id
+
+ # Expanded, additional event settings
+ if kmi.show_expanded:
+ box = col.box()
+
+ split = box.split(percentage=0.4)
+ sub = split.row()
+
+ if km.is_modal:
+ sub.prop(kmi, "propvalue", text="")
+ else:
+ # One day...
+ #~ sub.prop_search(kmi, "idname", bpy.context.window_manager, "operators_all", text="")
+ sub.prop(kmi, "idname", text="")
+
+ if map_type not in {'TEXTINPUT', 'TIMER'}:
+ sub = split.column()
+ subrow = sub.row(align=True)
+
+ if map_type == 'KEYBOARD':
+ subrow.prop(kmi, "type", text="", event=True)
+ subrow.prop(kmi, "value", text="")
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list