[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50588] branches/soc-2011-tomato: Merging r50576 through r50587 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Fri Sep 14 16:05:05 CEST 2012


Revision: 50588
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50588
Author:   nazgul
Date:     2012-09-14 14:05:05 +0000 (Fri, 14 Sep 2012)
Log Message:
-----------
Merging r50576 through r50587 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/GNUmakefile
    branches/soc-2011-tomato/intern/cycles/app/cycles_test.cpp
    branches/soc-2011-tomato/source/blender/avi/intern/avi.c
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/fmodifier.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/lattice.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/library.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_MaskOperation.cpp
    branches/soc-2011-tomato/source/blender/editors/animation/keyframes_draw.c
    branches/soc-2011-tomato/source/blender/editors/armature/poselib.c
    branches/soc-2011-tomato/source/blender/editors/armature/poseobject.c
    branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_icons.c
    branches/soc-2011-tomato/source/blender/editors/interface/resources.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_select.c
    branches/soc-2011-tomato/source/blender/editors/mesh/meshtools.c
    branches/soc-2011-tomato/source/blender/editors/physics/particle_object.c
    branches/soc-2011-tomato/source/blender/editors/screen/screen_ops.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_image.c
    branches/soc-2011-tomato/source/blender/editors/space_buttons/buttons_texture.c
    branches/soc-2011-tomato/source/blender/editors/space_node/drawnode.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_group.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-tomato/source/blender/editors/util/ed_util.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/filetype.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/iris.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_main_api.c
    branches/soc-2011-tomato/source/blender/nodes/composite/node_composite_tree.c
    branches/soc-2011-tomato/source/blender/render/intern/source/convertblender.c
    branches/soc-2011-tomato/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp

Added Paths:
-----------
    branches/soc-2011-tomato/build_files/cmake/cmake_static_check_smatch.py

Removed Paths:
-------------
    branches/soc-2011-tomato/source/blender/imbuf/intern/imbuf_cocoa.m

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


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
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/vgroup_modifiers:38694-39989
/trunk/blender:36831-50575
   + /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/vgroup_modifiers:38694-39989
/trunk/blender:36831-50587

Modified: branches/soc-2011-tomato/GNUmakefile
===================================================================
--- branches/soc-2011-tomato/GNUmakefile	2012-09-14 13:11:48 UTC (rev 50587)
+++ branches/soc-2011-tomato/GNUmakefile	2012-09-14 14:05:05 UTC (rev 50588)
@@ -251,6 +251,10 @@
 	$(CMAKE_CONFIG)
 	cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
 
+check_smatch:
+	$(CMAKE_CONFIG)
+	cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py
+
 check_spelling_py:
 	cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/release/scripts
 

Copied: branches/soc-2011-tomato/build_files/cmake/cmake_static_check_smatch.py (from rev 50587, trunk/blender/build_files/cmake/cmake_static_check_smatch.py)
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/cmake_static_check_smatch.py	                        (rev 0)
+++ branches/soc-2011-tomato/build_files/cmake/cmake_static_check_smatch.py	2012-09-14 14:05:05 UTC (rev 50588)
@@ -0,0 +1,73 @@
+#!/usr/bin/env python3.2
+
+# ***** 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.
+#
+# Contributor(s): Campbell Barton
+#
+# ***** END GPL LICENSE BLOCK *****
+
+# <pep8 compliant>
+
+CHECKER_IGNORE_PREFIX = [
+    "extern",
+    "intern/moto",
+    ]
+
+CHECKER_BIN = "smatch"
+CHECKER_ARGS = [
+    "--full-path",
+    "--two-passes",
+    ]
+
+import project_source_info
+import subprocess
+import sys
+
+
+def main():
+    source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
+
+    check_commands = []
+    for c, inc_dirs, defs in source_info:
+
+        cmd = ([CHECKER_BIN] +
+                CHECKER_ARGS +
+               [c] +
+               [("-I%s" % i) for i in inc_dirs] +
+               [("-D%s" % d) for d in defs]
+              )
+
+        check_commands.append((c, cmd))
+
+    def my_process(i, c, cmd):
+        percent = 100.0 * (i / (len(check_commands) - 1))
+        percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
+
+        sys.stdout.flush()
+        sys.stdout.write("%s %s\n" % (percent_str, c))
+
+        return subprocess.Popen(cmd)
+
+    process_functions = []
+    for i, (c, cmd) in enumerate(check_commands):
+        process_functions.append((my_process, (i, c, cmd)))
+
+    project_source_info.queue_processes(process_functions)
+
+
+if __name__ == "__main__":
+    main()

Modified: branches/soc-2011-tomato/intern/cycles/app/cycles_test.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/app/cycles_test.cpp	2012-09-14 13:11:48 UTC (rev 50587)
+++ branches/soc-2011-tomato/intern/cycles/app/cycles_test.cpp	2012-09-14 14:05:05 UTC (rev 50588)
@@ -272,6 +272,9 @@
 		options.scene_params.shadingsystem = SceneParams::OSL;
 	else if(ssname == "svm")
 		options.scene_params.shadingsystem = SceneParams::SVM;
+		
+	/* Progressive rendering */
+	options.session_params.progressive = true;
 
 	/* find matching device */
 	DeviceType device_type = Device::type_from_string(devicename.c_str());

Modified: branches/soc-2011-tomato/source/blender/avi/intern/avi.c
===================================================================
--- branches/soc-2011-tomato/source/blender/avi/intern/avi.c	2012-09-14 13:11:48 UTC (rev 50587)
+++ branches/soc-2011-tomato/source/blender/avi/intern/avi.c	2012-09-14 14:05:05 UTC (rev 50588)
@@ -734,9 +734,10 @@
 
 	fclose(movie->fp);
 
-	for (i = 0; i < movie->header->Streams; i++) {
-		if (movie->streams[i].sf != NULL)
+	for (i = 0; movie->header && (i < movie->header->Streams); i++) {
+		if (movie->streams && (movie->streams[i].sf != NULL)) {
 			MEM_freeN(movie->streams[i].sf);
+		}
 	}
 
 	if (movie->header != NULL)
@@ -1081,9 +1082,10 @@
 
 	fclose(movie->fp);
 
-	for (i = 0; i < movie->header->Streams; i++) {
-		if (movie->streams[i].sf != NULL)
+	for (i = 0; movie->header && (i < movie->header->Streams); i++) {
+		if (movie->streams && (movie->streams[i].sf != NULL)) {
 			MEM_freeN(movie->streams[i].sf);
+		}
 	}
 	if (movie->header != NULL)
 		MEM_freeN(movie->header);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h	2012-09-14 13:11:48 UTC (rev 50587)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h	2012-09-14 14:05:05 UTC (rev 50588)
@@ -102,8 +102,8 @@
 struct Mask *BKE_mask_copy_nolib(struct Mask *mask);
 struct Mask *BKE_mask_copy(struct Mask *mask);
 
-void BKE_mask_free(struct Mask *mask);
-void BKE_mask_unlink(struct Main *bmain, struct Mask *mask);
+void BKE_mask_free_nolib(struct Mask *mask);
+void BKE_mask_free(struct Main *bmain, struct Mask *mask);
 
 void BKE_mask_coord_from_frame(float r_co[2], const float co[2], const float frame_size[2]);
 void BKE_mask_coord_from_movieclip(struct MovieClip *clip, struct MovieClipUser *user, float r_co[2], const float co[2]);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c	2012-09-14 13:11:48 UTC (rev 50587)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c	2012-09-14 14:05:05 UTC (rev 50588)
@@ -2081,7 +2081,7 @@
 	if ((*final_r)->type != DM_TYPE_EDITBMESH) {
 		DM_ensure_tessface(*final_r);
 	}
-	if (cage_r) {
+	if (cage_r && *cage_r) {
 		if ((*cage_r)->type != DM_TYPE_EDITBMESH) {
 			if (*cage_r != *final_r) {
 				DM_ensure_tessface(*cage_r);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/fmodifier.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/fmodifier.c	2012-09-14 13:11:48 UTC (rev 50587)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/fmodifier.c	2012-09-14 14:05:05 UTC (rev 50588)
@@ -965,8 +965,8 @@
 	}
 	
 	/* only return for valid types */
-	if ( (type >= FMODIFIER_TYPE_NULL) && 
-	     (type <= FMODIFIER_NUM_TYPES) )
+	if ((type >= FMODIFIER_TYPE_NULL) &&
+	    (type <  FMODIFIER_NUM_TYPES))
 	{
 		/* there shouldn't be any segfaults here... */
 		return fmodifiersTypeInfo[type];

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/lattice.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/lattice.c	2012-09-14 13:11:48 UTC (rev 50587)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/lattice.c	2012-09-14 14:05:05 UTC (rev 50588)
@@ -488,7 +488,7 @@
 	/* test for cyclic */
 	bl = cu->bev.first;
 	if (!bl->nr) return 0;
-	if (bl && bl->poly > -1) cycl = 1;
+	if (bl->poly > -1) cycl = 1;
 
 	if (cycl == 0) {
 		ctime1 = CLAMPIS(ctime, 0.0f, 1.0f);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/library.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/library.c	2012-09-14 13:11:48 UTC (rev 50587)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/library.c	2012-09-14 14:05:05 UTC (rev 50588)
@@ -800,6 +800,7 @@
 /* used in headerbuttons.c image.c mesh.c screen.c sound.c and library.c */
 void BKE_libblock_free(ListBase *lb, void *idv)
 {
+	Main *bmain = G.main;  /* should eventually be an arg */
 	ID *id = idv;
 
 #ifdef WITH_PYTHON
@@ -899,7 +900,7 @@
 			BKE_movieclip_free((MovieClip *)id);
 			break;
 		case ID_MSK:
-			BKE_mask_free((Mask *)id);
+			BKE_mask_free(bmain, (Mask *)id);
 			break;
 	}
 
@@ -911,7 +912,7 @@
 	BLI_remlink(lb, id);
 
 	/* this ID may be a driver target! */
-	BKE_animdata_main_cb(G.main, animdata_dtar_clear_cb, (void *)id);
+	BKE_animdata_main_cb(bmain, animdata_dtar_clear_cb, (void *)id);
 
 	MEM_freeN(id);
 }
@@ -946,9 +947,52 @@
 		ID *id;
 		
 		while ( (id = lb->first) ) {
+#if 1
 			BKE_libblock_free(lb, id);
+#else
+			/* errors freeing ID's can be hard to track down,
+			 * enable this so valgrind will give the line number in its error log */
+			switch (a) {
+				case   0: BKE_libblock_free(lb, id); break;
+				case   1: BKE_libblock_free(lb, id); break;
+				case   2: BKE_libblock_free(lb, id); break;
+				case   3: BKE_libblock_free(lb, id); break;
+				case   4: BKE_libblock_free(lb, id); break;
+				case   5: BKE_libblock_free(lb, id); break;
+				case   6: BKE_libblock_free(lb, id); break;
+				case   7: BKE_libblock_free(lb, id); break;
+				case   8: BKE_libblock_free(lb, id); break;
+				case   9: BKE_libblock_free(lb, id); break;
+				case  10: BKE_libblock_free(lb, id); break;
+				case  11: BKE_libblock_free(lb, id); break;

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list