[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50108] branches/soc-2011-tomato: svn merge ^/trunk/blender -r50091:50107

Campbell Barton ideasman42 at gmail.com
Wed Aug 22 11:36:49 CEST 2012


Revision: 50108
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50108
Author:   campbellbarton
Date:     2012-08-22 09:36:49 +0000 (Wed, 22 Aug 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r50091:50107

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

Modified Paths:
--------------
    branches/soc-2011-tomato/CMakeLists.txt
    branches/soc-2011-tomato/build_files/scons/config/win64-mingw-config.py
    branches/soc-2011-tomato/build_files/scons/tools/Blender.py
    branches/soc-2011-tomato/source/blender/blenfont/intern/blf_font.c
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/colortools.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/rct.c
    branches/soc-2011-tomato/source/blender/editors/gpencil/gpencil_paint.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_draw.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_layout.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_panel.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_widgets.c
    branches/soc-2011-tomato/source/blender/editors/interface/view2d.c
    branches/soc-2011-tomato/source/blender/editors/interface/view2d_ops.c
    branches/soc-2011-tomato/source/blender/editors/object/object_vgroup.c
    branches/soc-2011-tomato/source/blender/editors/screen/area.c
    branches/soc-2011-tomato/source/blender/editors/screen/glutil.c
    branches/soc-2011-tomato/source/blender/editors/screen/screen_ops.c
    branches/soc-2011-tomato/source/blender/editors/screen/screendump.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_cursor.c
    branches/soc-2011-tomato/source/blender/editors/space_buttons/buttons_header.c
    branches/soc-2011-tomato/source/blender/editors/space_graph/graph_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_buttons.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_group.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_view.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/outliner_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_text/text_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_edit.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_snap.c
    branches/soc-2011-tomato/source/blender/nodes/composite/node_composite_util.c
    branches/soc-2011-tomato/source/blender/render/intern/source/convertblender.c
    branches/soc-2011-tomato/source/blender/render/intern/source/imagetexture.c
    branches/soc-2011-tomato/source/blender/render/intern/source/initrender.c
    branches/soc-2011-tomato/source/blender/render/intern/source/pipeline.c
    branches/soc-2011-tomato/source/blender/render/intern/source/rendercore.c
    branches/soc-2011-tomato/source/blender/render/intern/source/shadbuf.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_subwindow.c

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-50091
   + /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-50107

Modified: branches/soc-2011-tomato/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/CMakeLists.txt	2012-08-22 09:35:46 UTC (rev 50107)
+++ branches/soc-2011-tomato/CMakeLists.txt	2012-08-22 09:36:49 UTC (rev 50108)
@@ -1070,6 +1070,8 @@
 			set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -lpthread")
 			
 			add_definitions(-DFREE_WINDOWS64 -DMS_WIN64)
+			#Turn off OpenMP since it causes crashes on render for subsurfed/multiresolution meshes
+			set(WITH_OPENMP OFF)
 		endif()
 
 		add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)

Modified: branches/soc-2011-tomato/build_files/scons/config/win64-mingw-config.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/config/win64-mingw-config.py	2012-08-22 09:35:46 UTC (rev 50107)
+++ branches/soc-2011-tomato/build_files/scons/config/win64-mingw-config.py	2012-08-22 09:36:49 UTC (rev 50108)
@@ -176,7 +176,7 @@
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
 
 #May produce errors with unsupported MinGW-w64 builds
-WITH_BF_OPENMP = True
+WITH_BF_OPENMP = False
 
 ##
 CC = 'gcc'

Modified: branches/soc-2011-tomato/build_files/scons/tools/Blender.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/tools/Blender.py	2012-08-22 09:35:46 UTC (rev 50107)
+++ branches/soc-2011-tomato/build_files/scons/tools/Blender.py	2012-08-22 09:36:49 UTC (rev 50108)
@@ -857,6 +857,8 @@
         print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC
         lenv = self.Clone()
         lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
+        if lenv['OURPLATFORM'] in ('win32-mingw', 'win64-mingw', 'linuxcross', 'cygwin', 'linux'):
+            lenv.Replace(LINK = '$CXX')
         if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'):
             if lenv['BF_DEBUG']:
                 lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb','/NODEFAULTLIB:libcmt'])

Modified: branches/soc-2011-tomato/source/blender/blenfont/intern/blf_font.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenfont/intern/blf_font.c	2012-08-22 09:35:46 UTC (rev 50107)
+++ branches/soc-2011-tomato/source/blender/blenfont/intern/blf_font.c	2012-08-22 09:36:49 UTC (rev 50108)
@@ -456,7 +456,7 @@
 		ya = 1.0f;
 
 	blf_font_boundbox(font, str, &box);
-	return (box.ymax - box.ymin) * ya;
+	return BLI_RCT_SIZE_Y(&box) * ya;
 }
 
 float blf_font_fixed_width(FontBLF *font)

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h	2012-08-22 09:35:46 UTC (rev 50107)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h	2012-08-22 09:36:49 UTC (rev 50108)
@@ -301,21 +301,29 @@
 struct bNodeSocketType *ntreeGetSocketType(int type);
 
 struct bNodeTree *ntreeAddTree(const char *name, int type, int nodetype);
-void            ntreeInitTypes(struct bNodeTree *ntree);
+void              ntreeInitTypes(struct bNodeTree *ntree);
 
-void            ntreeFreeTree(struct bNodeTree *ntree);
+/* copy/free funcs, need to manage ID users */
+void              ntreeFreeTree_ex(struct bNodeTree *ntree, const short do_id_user);
+void              ntreeFreeTree(struct bNodeTree *ntree);
+struct bNodeTree *ntreeCopyTree_ex(struct bNodeTree *ntree, const short do_id_user);
 struct bNodeTree *ntreeCopyTree(struct bNodeTree *ntree);
-void            ntreeSwitchID(struct bNodeTree *ntree, struct ID *sce_from, struct ID *sce_to);
-void            ntreeMakeLocal(struct bNodeTree *ntree);
-int             ntreeHasType(struct bNodeTree *ntree, int type);
+void              ntreeSwitchID_ex(struct bNodeTree *ntree, struct ID *sce_from, struct ID *sce_to, const short do_id_user);
+void              ntreeSwitchID(struct bNodeTree *ntree, struct ID *sce_from, struct ID *sce_to);
+/* node->id user count */
+void              ntreeUserIncrefID(struct bNodeTree *ntree);
+void              ntreeUserDecrefID(struct bNodeTree *ntree);
 
-void            ntreeUpdateTree(struct bNodeTree *ntree);
+
+void              ntreeMakeLocal(struct bNodeTree *ntree);
+int               ntreeHasType(struct bNodeTree *ntree, int type);
+void              ntreeUpdateTree(struct bNodeTree *ntree);
 /* XXX Currently each tree update call does call to ntreeVerifyNodes too.
  * Some day this should be replaced by a decent depsgraph automatism!
  */
-void            ntreeVerifyNodes(struct Main *main, struct ID *id);
+void              ntreeVerifyNodes(struct Main *main, struct ID *id);
 
-void            ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes);
+void              ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes);
 
 /* XXX old trees handle output flags automatically based on special output node types and last active selection.
  * new tree types have a per-output socket flag to indicate the final output to use explicitly.

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/colortools.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/colortools.c	2012-08-22 09:35:46 UTC (rev 50107)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/colortools.c	2012-08-22 09:36:49 UTC (rev 50108)
@@ -669,7 +669,7 @@
 	CurveMap *cuma = cumap->cm + cumap->cur;
 	CurveMapPoint *cmp = cuma->curve;
 	rctf *clipr = &cumap->clipr;
-	float thresh = 0.01f * (clipr->xmax - clipr->xmin);
+	float thresh = 0.01f * BLI_RCT_SIZE_X(clipr);
 	float dx = 0.0f, dy = 0.0f;
 	int a;
 

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c	2012-08-22 09:35:46 UTC (rev 50107)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c	2012-08-22 09:36:49 UTC (rev 50108)
@@ -235,7 +235,7 @@
 	if (ma->preview) man->preview = BKE_previewimg_copy(ma->preview);
 
 	if (ma->nodetree) {
-		man->nodetree = ntreeCopyTree(ma->nodetree); /* 0 == full new tree */
+		man->nodetree = ntreeCopyTree(ma->nodetree);
 	}
 
 	man->gpumaterial.first = man->gpumaterial.last = NULL;
@@ -1483,7 +1483,11 @@
 	}
 }
 
-/* copy/paste buffer, if we had a propper py api that would be better */
+/**
+ * \brief copy/paste buffer, if we had a propper py api that would be better
+ * \note matcopybuf.nodetree does _NOT_ use ID's
+ * \todo matcopybuf.nodetree's  node->id's are NOT validated, this will crash!
+ */
 static Material matcopybuf;
 static short matcopied = 0;
 
@@ -1511,7 +1515,7 @@
 	matcopybuf.ramp_spec = NULL;
 
 	if (matcopybuf.nodetree) {
-		ntreeFreeTree(matcopybuf.nodetree);
+		ntreeFreeTree_ex(matcopybuf.nodetree, FALSE);
 		MEM_freeN(matcopybuf.nodetree);
 		matcopybuf.nodetree = NULL;
 	}
@@ -1537,7 +1541,7 @@
 			matcopybuf.mtex[a] = MEM_dupallocN(mtex);
 		}
 	}
-	matcopybuf.nodetree = ntreeCopyTree(ma->nodetree);
+	matcopybuf.nodetree = ntreeCopyTree_ex(ma->nodetree, FALSE);
 	matcopybuf.preview = NULL;
 	matcopybuf.gpumaterial.first = matcopybuf.gpumaterial.last = NULL;
 	matcopied = 1;
@@ -1582,7 +1586,7 @@
 		}
 	}
 
-	ma->nodetree = ntreeCopyTree(matcopybuf.nodetree);
+	ma->nodetree = ntreeCopyTree_ex(matcopybuf.nodetree, FALSE);
 }
 
 

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c	2012-08-22 09:35:46 UTC (rev 50107)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c	2012-08-22 09:36:49 UTC (rev 50108)
@@ -671,7 +671,7 @@
  * copying for internal use (threads for eg), where you wont want it to modify the
  * scene data.
  */
-static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, const short do_make_extern)
+static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, const short do_id_user, const short do_make_extern)
 {
 	bNodeTree *newtree;
 	bNode *node /*, *nnode */ /* UNUSED */, *last;
@@ -702,6 +702,11 @@
 	last = ntree->nodes.last;
 	for (node = ntree->nodes.first; node; node = node->next) {
 
+		/* ntreeUserDecrefID inline */
+		if (do_id_user) {
+			id_us_plus(node->id);
+		}
+
 		if (do_make_extern) {
 			id_lib_extern(node->id);
 		}
@@ -751,23 +756,57 @@
 	return newtree;
 }
 
+bNodeTree *ntreeCopyTree_ex(bNodeTree *ntree, const short do_id_user)
+{
+	return ntreeCopyTree_internal(ntree, do_id_user, TRUE);
+}
 bNodeTree *ntreeCopyTree(bNodeTree *ntree)
 {
-	return ntreeCopyTree_internal(ntree, TRUE);
+	return ntreeCopyTree_ex(ntree, TRUE);
 }
 
 /* use when duplicating scenes */
-void ntreeSwitchID(bNodeTree *ntree, ID *id_from, ID *id_to)
+void ntreeSwitchID_ex(bNodeTree *ntree, ID *id_from, ID *id_to, const short do_id_user)
 {
 	bNode *node;
+
+	if (id_from == id_to) {
+		/* should never happen but may as well skip if it does */
+		return;
+	}
+
 	/* for scene duplication only */
 	for (node = ntree->nodes.first; node; node = node->next) {
 		if (node->id == id_from) {
+			if (do_id_user) {
+				id_us_min(id_from);
+				id_us_plus(id_to);
+			}
+
 			node->id = id_to;
 		}
 	}
 }
+void ntreeSwitchID(bNodeTree *ntree, ID *id_from, ID *id_to)
+{

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list