[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43995] branches/soc-2011-tomato: Merging r43952 through r43994 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Wed Feb 8 21:40:54 CET 2012


Revision: 43995
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43995
Author:   nazgul
Date:     2012-02-08 20:40:44 +0000 (Wed, 08 Feb 2012)
Log Message:
-----------
Merging r43952 through r43994 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/GNUmakefile
    branches/soc-2011-tomato/build_files/scons/config/linux-config.py
    branches/soc-2011-tomato/build_files/scons/tools/Blender.py
    branches/soc-2011-tomato/intern/cycles/blender/blender_session.cpp
    branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp
    branches/soc-2011-tomato/intern/cycles/blender/blender_sync.h
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_shader.h
    branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_brightness.h
    branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_noise.h
    branches/soc-2011-tomato/release/scripts/modules/bpy_extras/anim_utils.py
    branches/soc-2011-tomato/release/scripts/modules/bpy_extras/mesh_utils.py
    branches/soc-2011-tomato/release/scripts/modules/console/complete_import.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/anim.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/clip.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/image.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/object.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/presets.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/sequencer.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_follow_active.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_lightmap.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_smart_project.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/vertexpaint_dirt.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/wm.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_curve.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_texture.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_info.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_logic.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_nla.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref_keymap.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/soc-2011-tomato/release/scripts/startup/keyingsets_builtins.py
    branches/soc-2011-tomato/release/scripts/templates/ui_menu.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_writeffmpeg.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/idcode.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/writeffmpeg.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_add.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_mods.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-tomato/source/blender/gpu/intern/gpu_shader_material.glsl
    branches/soc-2011-tomato/source/blender/gpu/intern/gpu_shader_material.glsl.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_genfile.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_ID.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_object_api.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Vector.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_noise.c
    branches/soc-2011-tomato/source/blender/render/intern/source/shadeoutput.c
    branches/soc-2011-tomato/source/tools/spell_check_source.py
    branches/soc-2011-tomato/source/tools/spell_check_source_config.py

Added Paths:
-----------
    branches/soc-2011-tomato/build_files/scons/config/Modules/
    branches/soc-2011-tomato/build_files/scons/config/Modules/FindPython.py
    branches/soc-2011-tomato/build_files/scons/config/Modules/__init__.py

Removed Paths:
-------------
    branches/soc-2011-tomato/build_files/scons/config/Modules/FindPython.py
    branches/soc-2011-tomato/build_files/scons/config/Modules/__init__.py

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /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/vgroup_modifiers:38694-39989
/trunk/blender:36831-43951
   + /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/vgroup_modifiers:38694-39989
/trunk/blender:36831-43994

Modified: branches/soc-2011-tomato/GNUmakefile
===================================================================
--- branches/soc-2011-tomato/GNUmakefile	2012-02-08 18:14:13 UTC (rev 43994)
+++ branches/soc-2011-tomato/GNUmakefile	2012-02-08 20:40:44 UTC (rev 43995)
@@ -169,6 +169,7 @@
 	@echo "  * check_cppcheck  - run blender source through cppcheck (C & C++)"
 	@echo "  * check_splint    - run blenders source through splint (C only)"
 	@echo "  * check_sparse    - run blenders source through sparse (C only)"
+	@echo "  * check_spelling  - check for spelling errors (Python only for now)"
 	@echo ""
 	@echo "Documentation Targets (not assosiated with building blender)"
 	@echo "  * doc_py   - generate sphinx python api docs"
@@ -242,7 +243,10 @@
 	$(CMAKE_CONFIG)
 	cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
 
+check_spelling:
+	cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py `find $(BLENDER_DIR)/release/scripts -name "*.py" | sort`
 
+
 # -----------------------------------------------------------------------------
 # Documentation
 #

Deleted: branches/soc-2011-tomato/build_files/scons/config/Modules/FindPython.py
===================================================================
--- trunk/blender/build_files/scons/config/Modules/FindPython.py	2012-02-08 18:14:13 UTC (rev 43994)
+++ branches/soc-2011-tomato/build_files/scons/config/Modules/FindPython.py	2012-02-08 20:40:44 UTC (rev 43995)
@@ -1,32 +0,0 @@
-import os
-
-def FindPython():
-    all_abi_flags = ['m', 'mu', '']
-
-    python = "/usr"
-    abi_flags = "m"  # Most common for linux distros
-    version = "3.2"
-
-    # Determine ABI flags used on this system
-    include = os.path.join(python, "include")
-    for cur_flags in all_abi_flags:
-        inc = os.path.join(include, "python" + version + cur_flags, "Python.h")
-        if os.path.exists(inc):
-            abi_flags = cur_flags
-            break
-
-    # Determine whether python is in /usr/lib or /usr/lib64
-    lib32 = os.path.join(python, "lib", "python" + version, "sysconfig.py")
-    lib64 = os.path.join(python, "lib64", "python" + version, "sysconfig.py")
-    if os.path.exists(lib32):
-        libpath = "${BF_PYTHON}/lib"
-    elif os.path.exists(lib64):
-        libpath = "${BF_PYTHON}/lib64"
-    else:
-        # roll back to default value
-        libpath = "${BF_PYTHON}/lib"
-
-    return {'PYTHON': python,
-            "VERSION": version,
-            'LIBPATH': libpath,
-            'ABI_FLAGS': abi_flags}

Copied: branches/soc-2011-tomato/build_files/scons/config/Modules/FindPython.py (from rev 43994, trunk/blender/build_files/scons/config/Modules/FindPython.py)
===================================================================
--- branches/soc-2011-tomato/build_files/scons/config/Modules/FindPython.py	                        (rev 0)
+++ branches/soc-2011-tomato/build_files/scons/config/Modules/FindPython.py	2012-02-08 20:40:44 UTC (rev 43995)
@@ -0,0 +1,32 @@
+import os
+
+def FindPython():
+    all_abi_flags = ['m', 'mu', '']
+
+    python = "/usr"
+    abi_flags = "m"  # Most common for linux distros
+    version = "3.2"
+
+    # Determine ABI flags used on this system
+    include = os.path.join(python, "include")
+    for cur_flags in all_abi_flags:
+        inc = os.path.join(include, "python" + version + cur_flags, "Python.h")
+        if os.path.exists(inc):
+            abi_flags = cur_flags
+            break
+
+    # Determine whether python is in /usr/lib or /usr/lib64
+    lib32 = os.path.join(python, "lib", "python" + version, "sysconfig.py")
+    lib64 = os.path.join(python, "lib64", "python" + version, "sysconfig.py")
+    if os.path.exists(lib32):
+        libpath = "${BF_PYTHON}/lib"
+    elif os.path.exists(lib64):
+        libpath = "${BF_PYTHON}/lib64"
+    else:
+        # roll back to default value
+        libpath = "${BF_PYTHON}/lib"
+
+    return {'PYTHON': python,
+            "VERSION": version,
+            'LIBPATH': libpath,
+            'ABI_FLAGS': abi_flags}

Deleted: branches/soc-2011-tomato/build_files/scons/config/Modules/__init__.py
===================================================================
Copied: branches/soc-2011-tomato/build_files/scons/config/Modules/__init__.py (from rev 43994, trunk/blender/build_files/scons/config/Modules/__init__.py)
===================================================================
Modified: branches/soc-2011-tomato/build_files/scons/config/linux-config.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/config/linux-config.py	2012-02-08 18:14:13 UTC (rev 43994)
+++ branches/soc-2011-tomato/build_files/scons/config/linux-config.py	2012-02-08 20:40:44 UTC (rev 43995)
@@ -1,6 +1,8 @@
 # find library directory
 import platform
 import os
+from Modules.FindPython import FindPython
+
 bitness = platform.architecture()[0]
 if bitness == '64bit':
     LCGDIR = '../lib/linux64'
@@ -8,10 +10,12 @@
     LCGDIR = '../lib/linux'
 LIBDIR = "#${LCGDIR}"
 
-BF_PYTHON_ABI_FLAGS = 'm'  # Most common for linux distros
-BF_PYTHON = '/usr'
-BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
-BF_PYTHON_VERSION = '3.2'
+py = FindPython()
+
+BF_PYTHON_ABI_FLAGS = py['ABI_FLAGS']
+BF_PYTHON = py['PYTHON']
+BF_PYTHON_LIBPATH = py['LIBPATH']
+BF_PYTHON_VERSION = py['VERSION']
 WITH_BF_STATICPYTHON = False
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'

Modified: branches/soc-2011-tomato/build_files/scons/tools/Blender.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/tools/Blender.py	2012-02-08 18:14:13 UTC (rev 43994)
+++ branches/soc-2011-tomato/build_files/scons/tools/Blender.py	2012-02-08 20:40:44 UTC (rev 43995)
@@ -437,8 +437,9 @@
     static_ob, shared_ob = SCons.Tool.createObjBuilders(env)
     static_ob.add_action('.c', mycaction)
     static_ob.add_action('.cpp', mycppaction)
+    static_ob.add_action('.cc', mycppaction)
     shared_ob.add_action('.c', myshcaction)
-    shared_ob.add_action('.cpp', myshcppaction)
+    shared_ob.add_action('.cc', myshcppaction)
 
     static_lib = SCons.Builder.Builder(action = mylibaction,
                                        emitter = '$LIBEMITTER',
@@ -648,8 +649,11 @@
 
     dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
 
+    lib = env['BF_PYTHON_LIBPATH'].split(os.sep)[-1]
+    target_lib = "lib64" if lib == "lib64" else "lib"
+
     py_src =    env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] )
-    py_target =    env.subst( dir + '/python/lib/python'+env['BF_PYTHON_VERSION'] )
+    py_target =    env.subst( dir + '/python/' + target_lib + '/python'+env['BF_PYTHON_VERSION'] )
     
     # This is a bit weak, but dont install if its been installed before, makes rebuilds quite slow.
     if os.path.exists(py_target):

Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_session.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_session.cpp	2012-02-08 18:14:13 UTC (rev 43994)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_session.cpp	2012-02-08 20:40:44 UTC (rev 43995)
@@ -191,14 +191,8 @@
 	BL::RenderResult::layers_iterator b_iter;
 	BL::RenderLayers b_rr_layers(r.ptr);
 	
-	int active = 0;
-
 	/* render each layer */
-	for(b_rr.layers.begin(b_iter); b_iter != b_rr.layers.end(); ++b_iter, ++active) {
-		/* single layer render */
-		if(r.use_single_layer())
-			active = b_rr_layers.active_index();
-
+	for(b_rr.layers.begin(b_iter); b_iter != b_rr.layers.end(); ++b_iter) {
 		/* set layer */
 		b_rlay = *b_iter;
 
@@ -226,7 +220,7 @@
 		session->reset(buffer_params, session_params.samples);
 
 		/* update scene */
-		sync->sync_data(b_v3d, active);
+		sync->sync_data(b_v3d, b_iter->name().c_str());
 
 		/* render */
 		session->start();
@@ -394,7 +388,7 @@
 
 void BlenderSession::update_status_progress()
 {
-	string status, substatus;
+	string timestatus, status, substatus;
 	float progress;
 	double total_time;
 	char time_str[128];
@@ -403,13 +397,13 @@
 	get_progress(progress, total_time);
 
 	BLI_timestr(total_time, time_str);
-	status = "Elapsed: " + string(time_str) + " | " + status;
+	timestatus = "Elapsed: " + string(time_str) + " | ";
 
 	if(substatus.size() > 0)
 		status += " | " + substatus;
 
 	if(status != last_status) {
-		RE_engine_update_stats((RenderEngine*)b_engine.ptr.data, "", status.c_str());
+		RE_engine_update_stats((RenderEngine*)b_engine.ptr.data, "", (timestatus + status).c_str());
 		last_status = status;
 	}
 	if(progress != last_progress) {

Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp	2012-02-08 18:14:13 UTC (rev 43994)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_sync.cpp	2012-02-08 20:40:44 UTC (rev 43995)
@@ -122,7 +122,7 @@
 	return recalc;
 }
 
-void BlenderSync::sync_data(BL::SpaceView3D b_v3d, int layer)
+void BlenderSync::sync_data(BL::SpaceView3D b_v3d, const char *layer)
 {
 	sync_render_layers(b_v3d);
 	sync_integrator(layer);
@@ -133,7 +133,7 @@
 
 /* Integrator */
 
-void BlenderSync::sync_integrator(int layer)
+void BlenderSync::sync_integrator(const char *layer)
 {
 	PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
 
@@ -155,8 +155,21 @@
 
 	integrator->no_caustics = get_boolean(cscene, "no_caustics");
 	integrator->seed = get_int(cscene, "seed");
-	integrator->layer_flag = render_layers[layer].layer;
 
+	/* render layer */
+	int active_layer = 0;
+
+	if(layer) {

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list