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

Antony Riakiotakis kalast at gmail.com
Sat Jun 29 01:58:59 CEST 2013


Revision: 57867
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57867
Author:   psy-fi
Date:     2013-06-28 23:58:58 +0000 (Fri, 28 Jun 2013)
Log Message:
-----------
Merge trunk -r57861 into soc-2013-paint

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

Modified Paths:
--------------
    branches/soc-2013-paint/doc/python_api/examples/bpy.app.translations.py
    branches/soc-2013-paint/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py
    branches/soc-2013-paint/intern/cycles/blender/addon/ui.py
    branches/soc-2013-paint/intern/cycles/blender/blender_curves.cpp
    branches/soc-2013-paint/intern/cycles/device/device_cuda.cpp
    branches/soc-2013-paint/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h
    branches/soc-2013-paint/intern/cycles/kernel/closure/bsdf_phong_ramp.h
    branches/soc-2013-paint/intern/cycles/kernel/kernel_compat_opencl.h
    branches/soc-2013-paint/intern/cycles/kernel/kernel_sse2.cpp
    branches/soc-2013-paint/intern/cycles/kernel/kernel_sse3.cpp
    branches/soc-2013-paint/intern/cycles/kernel/osl/osl_services.cpp
    branches/soc-2013-paint/intern/cycles/kernel/osl/osl_services.h
    branches/soc-2013-paint/intern/cycles/kernel/osl/osl_shader.cpp
    branches/soc-2013-paint/intern/cycles/kernel/shaders/CMakeLists.txt
    branches/soc-2013-paint/intern/cycles/kernel/shaders/SConscript
    branches/soc-2013-paint/intern/cycles/kernel/shaders/node_brick_texture.osl
    branches/soc-2013-paint/intern/cycles/kernel/svm/svm_brick.h
    branches/soc-2013-paint/intern/cycles/render/background.cpp
    branches/soc-2013-paint/intern/cycles/render/background.h
    branches/soc-2013-paint/intern/cycles/render/osl.cpp
    branches/soc-2013-paint/intern/cycles/render/scene.h
    branches/soc-2013-paint/intern/cycles/render/shader.cpp
    branches/soc-2013-paint/intern/cycles/util/util_math.h
    branches/soc-2013-paint/intern/cycles/util/util_types.h
    branches/soc-2013-paint/intern/cycles/util/util_vector.h
    branches/soc-2013-paint/intern/ghost/intern/GHOST_SystemCocoa.mm
    branches/soc-2013-paint/intern/ghost/intern/GHOST_WindowWin32.cpp
    branches/soc-2013-paint/intern/locale/boost_locale_wrapper.cpp
    branches/soc-2013-paint/release/datafiles/startup.blend
    branches/soc-2013-paint/release/scripts/modules/bl_i18n_utils/utils_languages_menu.py
    branches/soc-2013-paint/release/scripts/modules/bpy/utils.py
    branches/soc-2013-paint/release/scripts/modules/console/complete_namespace.py
    branches/soc-2013-paint/release/scripts/modules/nodeitems_utils.py
    branches/soc-2013-paint/release/scripts/startup/bl_operators/anim.py
    branches/soc-2013-paint/release/scripts/startup/bl_operators/node.py
    branches/soc-2013-paint/release/scripts/startup/bl_operators/presets.py
    branches/soc-2013-paint/release/scripts/startup/bl_operators/vertexpaint_dirt.py
    branches/soc-2013-paint/release/scripts/startup/bl_operators/view3d.py
    branches/soc-2013-paint/release/scripts/startup/bl_operators/wm.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_data_mesh.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_data_modifier.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_freestyle.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_game.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_physics_fluid.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_render.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/space_clip.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/space_image.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/space_info.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/space_node.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/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/soc-2013-paint/release/scripts/startup/nodeitems_builtins.py
    branches/soc-2013-paint/release/text/readme.html
    branches/soc-2013-paint/source/blender/blenfont/intern/blf.c
    branches/soc-2013-paint/source/blender/blenfont/intern/blf_dir.c
    branches/soc-2013-paint/source/blender/blenfont/intern/blf_font.c
    branches/soc-2013-paint/source/blender/blenfont/intern/blf_glyph.c
    branches/soc-2013-paint/source/blender/blenfont/intern/blf_internal_types.h
    branches/soc-2013-paint/source/blender/blenkernel/BKE_DerivedMesh.h
    branches/soc-2013-paint/source/blender/blenkernel/BKE_blender.h
    branches/soc-2013-paint/source/blender/blenkernel/BKE_mball.h
    branches/soc-2013-paint/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/depsgraph.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/effect.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/image_gen.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/lattice.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/mball.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/mesh.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/object.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/tracking.c
    branches/soc-2013-paint/source/blender/blenlib/intern/path_util.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_polygon.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_polygon.h
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_connect.c
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_subdivide.c
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_wireframe.c
    branches/soc-2013-paint/source/blender/editors/animation/fmodifier_ui.c
    branches/soc-2013-paint/source/blender/editors/armature/armature_relations.c
    branches/soc-2013-paint/source/blender/editors/armature/armature_skinning.c
    branches/soc-2013-paint/source/blender/editors/armature/meshlaplacian.c
    branches/soc-2013-paint/source/blender/editors/curve/editcurve.c
    branches/soc-2013-paint/source/blender/editors/curve/editfont.c
    branches/soc-2013-paint/source/blender/editors/curve/lorem.c
    branches/soc-2013-paint/source/blender/editors/include/ED_mesh.h
    branches/soc-2013-paint/source/blender/editors/interface/interface_regions.c
    branches/soc-2013-paint/source/blender/editors/interface/interface_widgets.c
    branches/soc-2013-paint/source/blender/editors/interface/resources.c
    branches/soc-2013-paint/source/blender/editors/mesh/editmesh_select.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/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_add.c
    branches/soc-2013-paint/source/blender/editors/object/object_hook.c
    branches/soc-2013-paint/source/blender/editors/object/object_lattice.c
    branches/soc-2013-paint/source/blender/editors/object/object_relations.c
    branches/soc-2013-paint/source/blender/editors/object/object_shapekey.c
    branches/soc-2013-paint/source/blender/editors/object/object_vgroup.c
    branches/soc-2013-paint/source/blender/editors/screen/screen_edit.c
    branches/soc-2013-paint/source/blender/editors/screen/screen_ops.c
    branches/soc-2013-paint/source/blender/editors/screen/screendump.c
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/CMakeLists.txt
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_intern.h
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_vertex.c
    branches/soc-2013-paint/source/blender/editors/space_clip/clip_buttons.c
    branches/soc-2013-paint/source/blender/editors/space_clip/clip_dopesheet_draw.c
    branches/soc-2013-paint/source/blender/editors/space_graph/graph_buttons.c
    branches/soc-2013-paint/source/blender/editors/space_image/image_ops.c
    branches/soc-2013-paint/source/blender/editors/space_script/script_edit.c
    branches/soc-2013-paint/source/blender/editors/space_view3d/view3d_buttons.c
    branches/soc-2013-paint/source/blender/editors/space_view3d/view3d_snap.c
    branches/soc-2013-paint/source/blender/editors/transform/transform_conversions.c
    branches/soc-2013-paint/source/blender/ikplugin/intern/ikplugin_api.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_brush.c
    branches/soc-2013-paint/source/blender/python/intern/bpy_rna_array.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/pipeline.c
    branches/soc-2013-paint/source/blender/render/intern/source/shadeoutput.c
    branches/soc-2013-paint/source/blender/windowmanager/intern/wm_cursors.c
    branches/soc-2013-paint/source/blender/windowmanager/intern/wm_event_system.c
    branches/soc-2013-paint/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2013-paint/source/gameengine/Ketsji/BL_Shader.cpp
    branches/soc-2013-paint/source/tests/bl_run_operators.py

Added Paths:
-----------
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_vertex_proj.c

Modified: branches/soc-2013-paint/doc/python_api/examples/bpy.app.translations.py
===================================================================
--- branches/soc-2013-paint/doc/python_api/examples/bpy.app.translations.py	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/doc/python_api/examples/bpy.app.translations.py	2013-06-28 23:58:58 UTC (rev 57867)
@@ -4,7 +4,7 @@
 
 .. warning::
    Most of this object should only be useful if you actually manipulate i18n stuff from Python.
-   If you are a regular addon, you should only bother about :const:`contexts` member, 
+   If you are a regular addon, you should only bother about :const:`contexts` member,
    and the :func:`register`/:func:`unregister` functions! The :func:`pgettext` family of functions
    should only be used in rare, specific cases (like e.g. complex "composited" UI strings...).
 

Modified: branches/soc-2013-paint/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py
===================================================================
--- branches/soc-2013-paint/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/doc/python_api/examples/bpy.types.WindowManager.popup_menu.py	2013-06-28 23:58:58 UTC (rev 57867)
@@ -8,6 +8,7 @@
 
 import bpy
 
+
 def draw(self, context):
     self.layout.label("Hello World")
 

Modified: branches/soc-2013-paint/intern/cycles/blender/addon/ui.py
===================================================================
--- branches/soc-2013-paint/intern/cycles/blender/addon/ui.py	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/intern/cycles/blender/addon/ui.py	2013-06-28 23:58:58 UTC (rev 57867)
@@ -773,6 +773,7 @@
         row.prop(light, "ao_factor", text="Factor")
         row.prop(light, "distance", text="Distance")
 
+
 class CyclesWorld_PT_mist(CyclesButtonsPanel, Panel):
     bl_label = "Mist Pass"
     bl_context = "world"
@@ -940,7 +941,7 @@
         col = split.column(align=True)
         col.label()
         col.prop(mat, "pass_index")
-        
+
         col = layout.column()
         col.prop(cmat, "sample_as_light")
         col.prop(cmat, "use_transparent_shadow")
@@ -1166,7 +1167,7 @@
 
             row = layout.row()
             row.prop(ccscene, "use_parents", text="Include parents")
-        
+
         row = layout.row()
         row.prop(ccscene, "minimum_width", text="Min Pixels")
         row.prop(ccscene, "maximum_width", text="Max Ext.")
@@ -1198,7 +1199,7 @@
         row = layout.row()
         row.prop(cpsys, "root_width", text="Root")
         row.prop(cpsys, "tip_width", text="Tip")
-        
+
         row = layout.row()
         row.prop(cpsys, "radius_scale", text="Scaling")
         row.prop(cpsys, "use_closetip", text="Close tip")

Modified: branches/soc-2013-paint/intern/cycles/blender/blender_curves.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/blender/blender_curves.cpp	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/intern/cycles/blender/blender_curves.cpp	2013-06-28 23:58:58 UTC (rev 57867)
@@ -183,7 +183,7 @@
 				int mi = clamp(b_psys.settings().material()-1, 0, mesh->used_shaders.size()-1);
 				int shader = mesh->used_shaders[mi];
 				int draw_step = background ? b_psys.settings().render_step() : b_psys.settings().draw_step();
-				int ren_step = (int)pow((float)2.0f,(float)draw_step);
+				int ren_step = (int)powf(2.0f, (float)draw_step);
 				int totparts = b_psys.particles.length();
 				int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_psys.settings().draw_percentage() / 100.0f);
 				int totcurves = totchild;

Modified: branches/soc-2013-paint/intern/cycles/device/device_cuda.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/device/device_cuda.cpp	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/intern/cycles/device/device_cuda.cpp	2013-06-28 23:58:58 UTC (rev 57867)
@@ -607,13 +607,8 @@
 		cuda_assert(cuParamSetSize(cuPathTrace, offset))
 
 		/* launch kernel: todo find optimal size, cache config for fermi */
-#ifndef __APPLE__
 		int xthreads = 16;
 		int ythreads = 16;
-#else
-		int xthreads = 8;
-		int ythreads = 8;
-#endif
 		int xblocks = (rtile.w + xthreads - 1)/xthreads;
 		int yblocks = (rtile.h + ythreads - 1)/ythreads;
 
@@ -676,13 +671,8 @@
 		cuda_assert(cuParamSetSize(cuFilmConvert, offset))
 
 		/* launch kernel: todo find optimal size, cache config for fermi */
-#ifndef __APPLE__
 		int xthreads = 16;
 		int ythreads = 16;
-#else
-		int xthreads = 8;
-		int ythreads = 8;
-#endif
 		int xblocks = (task.w + xthreads - 1)/xthreads;
 		int yblocks = (task.h + ythreads - 1)/ythreads;
 
@@ -730,11 +720,7 @@
 		cuda_assert(cuParamSetSize(cuDisplace, offset))
 
 		/* launch kernel: todo find optimal size, cache config for fermi */
-#ifndef __APPLE__
 		int xthreads = 16;
-#else
-		int xthreads = 8;
-#endif
 		int xblocks = (task.shader_w + xthreads - 1)/xthreads;
 
 		cuda_assert(cuFuncSetCacheConfig(cuDisplace, CU_FUNC_CACHE_PREFER_L1))

Modified: branches/soc-2013-paint/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h
===================================================================
--- branches/soc-2013-paint/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/intern/cycles/kernel/closure/bsdf_diffuse_ramp.h	2013-06-28 23:58:58 UTC (rev 57867)
@@ -41,6 +41,8 @@
 	
 	float npos = pos * (float)(MAXCOLORS - 1);
 	int ipos = float_to_int(npos);
+	if (ipos < 0)
+		return colors[0];
 	if (ipos >= (MAXCOLORS - 1))
 		return colors[MAXCOLORS - 1];
 	float offset = npos - (float)ipos;

Modified: branches/soc-2013-paint/intern/cycles/kernel/closure/bsdf_phong_ramp.h
===================================================================
--- branches/soc-2013-paint/intern/cycles/kernel/closure/bsdf_phong_ramp.h	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/intern/cycles/kernel/closure/bsdf_phong_ramp.h	2013-06-28 23:58:58 UTC (rev 57867)
@@ -41,6 +41,8 @@
 	
 	float npos = pos * (float)(MAXCOLORS - 1);
 	int ipos = float_to_int(npos);
+	if (ipos < 0)
+		return colors[0];
 	if (ipos >= (MAXCOLORS - 1))
 		return colors[MAXCOLORS - 1];
 	float offset = npos - (float)ipos;
@@ -49,6 +51,8 @@
 
 __device int bsdf_phong_ramp_setup(ShaderClosure *sc)
 {
+	sc->data0 = max(sc->data0, 0.0f);
+	
 	sc->type = CLOSURE_BSDF_PHONG_RAMP_ID;
 	return SD_BSDF | SD_BSDF_HAS_EVAL | SD_BSDF_GLOSSY;
 }

Modified: branches/soc-2013-paint/intern/cycles/kernel/kernel_compat_opencl.h
===================================================================
--- branches/soc-2013-paint/intern/cycles/kernel/kernel_compat_opencl.h	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/intern/cycles/kernel/kernel_compat_opencl.h	2013-06-28 23:58:58 UTC (rev 57867)
@@ -108,7 +108,6 @@
 
 /* data lookup defines */
 #define kernel_data (*kg->data)
-#define kernel_tex_lookup(t, x, offset, size) kernel_tex_lookup_(kg->t, offset, size, x)
 #define kernel_tex_fetch(t, index) kg->t[index]
 
 /* define NULL */

Modified: branches/soc-2013-paint/intern/cycles/kernel/kernel_sse2.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/kernel/kernel_sse2.cpp	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/intern/cycles/kernel/kernel_sse2.cpp	2013-06-28 23:58:58 UTC (rev 57867)
@@ -22,6 +22,8 @@
 
 #ifdef WITH_OPTIMIZED_KERNEL
 
+#define __KERNEL_SSE2__
+
 #include "kernel.h"
 #include "kernel_compat_cpu.h"
 #include "kernel_math.h"

Modified: branches/soc-2013-paint/intern/cycles/kernel/kernel_sse3.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/kernel/kernel_sse3.cpp	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/intern/cycles/kernel/kernel_sse3.cpp	2013-06-28 23:58:58 UTC (rev 57867)
@@ -22,6 +22,7 @@
 
 #ifdef WITH_OPTIMIZED_KERNEL
 
+#define __KERNEL_SSE2__
 #define __KERNEL_SSE3__
 #define __KERNEL_SSSE3__
 

Modified: branches/soc-2013-paint/intern/cycles/kernel/osl/osl_services.cpp
===================================================================
--- branches/soc-2013-paint/intern/cycles/kernel/osl/osl_services.cpp	2013-06-28 23:49:01 UTC (rev 57866)
+++ branches/soc-2013-paint/intern/cycles/kernel/osl/osl_services.cpp	2013-06-28 23:58:58 UTC (rev 57867)
@@ -104,9 +104,10 @@
 {
 }
 
-void OSLRenderServices::thread_init(KernelGlobals *kernel_globals_)
+void OSLRenderServices::thread_init(KernelGlobals *kernel_globals_, OSL::TextureSystem *osl_ts_)
 {
 	kernel_globals = kernel_globals_;
+	osl_ts = osl_ts_;
 }
 
 bool OSLRenderServices::get_matrix(OSL::Matrix44 &result, OSL::TransformationPtr xform, float time)
@@ -767,7 +768,7 @@
                                 float s, float t, float dsdx, float dtdx,
                                 float dsdy, float dtdy, float *result)
 {
-	OSL::TextureSystem *ts = kernel_globals->osl->ts;
+	OSL::TextureSystem *ts = osl_ts;
 	bool status = ts->texture(filename, options, s, t, dsdx, dtdx, dsdy, dtdy, result);
 
 	if(!status) {
@@ -789,7 +790,7 @@
                                   const OSL::Vec3 &dPdx, const OSL::Vec3 &dPdy,
                                   const OSL::Vec3 &dPdz, float *result)
 {
-	OSL::TextureSystem *ts = kernel_globals->osl->ts;
+	OSL::TextureSystem *ts = osl_ts;
 	bool status = ts->texture3d(filename, options, P, dPdx, dPdy, dPdz, result);
 
 	if(!status) {
@@ -811,7 +812,7 @@
                                     OSL::ShaderGlobals *sg, const OSL::Vec3 &R,
                                     const OSL::Vec3 &dRdx, const OSL::Vec3 &dRdy, float *result)
 {
-	OSL::TextureSystem *ts = kernel_globals->osl->ts;
+	OSL::TextureSystem *ts = osl_ts;
 	bool status = ts->environment(filename, options, R, dRdx, dRdy, result);
 
 	if(!status) {
@@ -832,7 +833,7 @@
                                          ustring dataname,
                                          TypeDesc datatype, void *data)
 {
-	OSL::TextureSystem *ts = kernel_globals->osl->ts;
+	OSL::TextureSystem *ts = osl_ts;
 	return ts->get_texture_info(filename, subimage, dataname, datatype, data);
 }
 

Modified: branches/soc-2013-paint/intern/cycles/kernel/osl/osl_services.h

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list