[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59029] branches/soc-2011-tomato: Merging r59000 through r59028 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Fri Aug 9 03:09:57 CEST 2013


Revision: 59029
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59029
Author:   nazgul
Date:     2013-08-09 01:09:55 +0000 (Fri, 09 Aug 2013)
Log Message:
-----------
Merging r59000 through r59028 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/CMakeLists.txt
    branches/soc-2011-tomato/build_files/cmake/cmake_static_check_smatch.py
    branches/soc-2011-tomato/build_files/cmake/cmake_static_check_sparse.py
    branches/soc-2011-tomato/build_files/cmake/project_source_info.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_image.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/particle.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-tomato/source/blender/editors/object/object_group.c
    branches/soc-2011-tomato/source/blender/editors/screen/screen_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_time/space_time.c
    branches/soc-2011-tomato/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
    branches/soc-2011-tomato/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_meta.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvg_util.c
    branches/soc-2011-tomato/source/blender/render/intern/include/zbuf.h
    branches/soc-2011-tomato/source/blender/render/intern/source/pointdensity.c
    branches/soc-2011-tomato/source/blender/render/intern/source/zbuf.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_dev:58091-58422
/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-2013-depsgraph_mt:57516
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835
/branches/vgroup_modifiers:38694-39989
/tags/blender-2.67b-release/blender:57122
/trunk/blender:36831-58999
   + /branches/ge_dev:58091-58422
/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-2013-depsgraph_mt:57516
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835
/branches/vgroup_modifiers:38694-39989
/tags/blender-2.67b-release/blender:57122
/trunk/blender:36831-59028

Modified: branches/soc-2011-tomato/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/CMakeLists.txt	2013-08-08 20:35:19 UTC (rev 59028)
+++ branches/soc-2011-tomato/CMakeLists.txt	2013-08-09 01:09:55 UTC (rev 59029)
@@ -416,6 +416,10 @@
 	set(WITH_HEADLESS ON)
 endif()
 
+if(NOT WITH_PYTHON)
+	set(WITH_CYCLES OFF)
+endif()
+
 # enable boost for cycles, booleans, audaspace or i18n
 # otherwise if the user disabled
 if(NOT WITH_BOOST)

Modified: branches/soc-2011-tomato/build_files/cmake/cmake_static_check_smatch.py
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/cmake_static_check_smatch.py	2013-08-08 20:35:19 UTC (rev 59028)
+++ branches/soc-2011-tomato/build_files/cmake/cmake_static_check_smatch.py	2013-08-09 01:09:55 UTC (rev 59029)
@@ -44,6 +44,7 @@
 
 def main():
     source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
+    source_defines = project_source_info.build_defines_as_args()
 
     check_commands = []
     for c, inc_dirs, defs in source_info:
@@ -52,7 +53,8 @@
                CHECKER_ARGS +
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
-               [("-D%s" % d) for d in defs]
+               [("-D%s" % d) for d in defs] +
+               source_defines
                )
 
         check_commands.append((c, cmd))

Modified: branches/soc-2011-tomato/build_files/cmake/cmake_static_check_sparse.py
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/cmake_static_check_sparse.py	2013-08-08 20:35:19 UTC (rev 59028)
+++ branches/soc-2011-tomato/build_files/cmake/cmake_static_check_sparse.py	2013-08-09 01:09:55 UTC (rev 59029)
@@ -42,6 +42,7 @@
 
 def main():
     source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
+    source_defines = project_source_info.build_defines_as_args()
 
     check_commands = []
     for c, inc_dirs, defs in source_info:
@@ -50,7 +51,8 @@
                CHECKER_ARGS +
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
-               [("-D%s" % d) for d in defs]
+               [("-D%s" % d) for d in defs] +
+               source_defines
                )
 
         check_commands.append((c, cmd))

Modified: branches/soc-2011-tomato/build_files/cmake/project_source_info.py
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/project_source_info.py	2013-08-08 20:35:19 UTC (rev 59028)
+++ branches/soc-2011-tomato/build_files/cmake/project_source_info.py	2013-08-09 01:09:55 UTC (rev 59029)
@@ -171,6 +171,26 @@
     return source
 
 
+def build_defines_as_source():
+    """
+    Returns a string formatted as an include:
+        '#defines A=B\n#define....'
+    """
+    import subprocess
+    # works for both gcc and clang
+    cmd = (cmake_cache_var("CMAKE_C_COMPILER"), "-dM", "-E", "-")
+    return subprocess.Popen(cmd,
+                            stdout=subprocess.PIPE,
+                            stdin=subprocess.DEVNULL,
+                            ).stdout.read().strip().decode('ascii')
+
+
+def build_defines_as_args():
+    return [("-D" + "=".join(l.split(maxsplit=2)[1:]))
+            for l in build_defines_as_source().split("\n")
+            if l.startswith('#define')]
+
+
 # could be moved elsewhere!, this just happens to be used by scripts that also
 # use this module.
 def queue_processes(process_funcs, job_total=-1):

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_image.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_image.h	2013-08-08 20:35:19 UTC (rev 59028)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_image.h	2013-08-09 01:09:55 UTC (rev 59029)
@@ -161,7 +161,7 @@
 struct Image *BKE_image_load_exists(const char *filepath);
 
 /* adds image, adds ibuf, generates color or pattern */
-struct Image *BKE_image_add_generated(struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, float color[4]);
+struct Image *BKE_image_add_generated(struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4]);
 /* adds image from imbuf, owns imbuf */
 struct Image *BKE_image_add_from_imbuf(struct ImBuf *ibuf);
 

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c	2013-08-08 20:35:19 UTC (rev 59028)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c	2013-08-09 01:09:55 UTC (rev 59029)
@@ -653,7 +653,7 @@
 }
 
 static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type,
-                            float color[4], ColorManagedColorspaceSettings *colorspace_settings)
+                            const float color[4], ColorManagedColorspaceSettings *colorspace_settings)
 {
 	ImBuf *ibuf;
 	unsigned char *rect = NULL;
@@ -710,7 +710,7 @@
 }
 
 /* adds new image block, creates ImBuf and initializes color */
-Image *BKE_image_add_generated(Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, float color[4])
+Image *BKE_image_add_generated(Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4])
 {
 	/* on save, type is changed to FILE in editsima.c */
 	Image *ima = image_alloc(bmain, name, IMA_SRC_GENERATED, IMA_TYPE_UV_TEST);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/particle.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/particle.c	2013-08-08 20:35:19 UTC (rev 59028)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/particle.c	2013-08-09 01:09:55 UTC (rev 59029)
@@ -3836,7 +3836,7 @@
 
 	for (m = 0; m < MAX_MTEX; m++, mtexp++) {
 		mtex = *mtexp;
-		if (mtex && mtex->mapto) {
+		if (mtex && mtex->tex && mtex->mapto) {
 			float def = mtex->def_var;
 			short blend = mtex->blendtype;
 			short texco = mtex->texco;
@@ -3904,7 +3904,7 @@
 
 	for (m = 0; m < MAX_MTEX; m++, mtexp++) {
 		mtex = *mtexp;
-		if (mtex && mtex->mapto) {
+		if (mtex && mtex->tex && mtex->mapto) {
 			float def = mtex->def_var;
 			short blend = mtex->blendtype;
 			short texco = mtex->texco;

Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c	2013-08-08 20:35:19 UTC (rev 59028)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c	2013-08-09 01:09:55 UTC (rev 59029)
@@ -328,7 +328,7 @@
 	oldnewmap_insert(onm, oldaddr, newaddr, nr);
 }
 
-static void *oldnewmap_lookup_and_inc(OldNewMap *onm, void *addr) 
+static void *oldnewmap_lookup_and_inc(OldNewMap *onm, void *addr, bool increase_users) 
 {
 	int i;
 	
@@ -338,7 +338,8 @@
 		OldNew *entry = &onm->entries[++onm->lasthit];
 		
 		if (entry->old == addr) {
-			entry->nr++;
+			if (increase_users)
+				entry->nr++;
 			return entry->newp;
 		}
 	}
@@ -349,7 +350,8 @@
 		if (entry->old == addr) {
 			onm->lasthit = i;
 			
-			entry->nr++;
+			if (increase_users)
+				entry->nr++;
 			return entry->newp;
 		}
 	}
@@ -1201,34 +1203,39 @@
 
 static void *newdataadr(FileData *fd, void *adr)		/* only direct databocks */
 {
-	return oldnewmap_lookup_and_inc(fd->datamap, adr);
+	return oldnewmap_lookup_and_inc(fd->datamap, adr, true);
 }
 
+static void *newdataadr_no_us(FileData *fd, void *adr)		/* only direct databocks */
+{
+	return oldnewmap_lookup_and_inc(fd->datamap, adr, false);
+}
+
 static void *newglobadr(FileData *fd, void *adr)	    /* direct datablocks with global linking */
 {
-	return oldnewmap_lookup_and_inc(fd->globmap, adr);
+	return oldnewmap_lookup_and_inc(fd->globmap, adr, true);
 }
 
 static void *newimaadr(FileData *fd, void *adr)		    /* used to restore image data after undo */
 {
 	if (fd->imamap && adr)
-		return oldnewmap_lookup_and_inc(fd->imamap, adr);
+		return oldnewmap_lookup_and_inc(fd->imamap, adr, true);
 	return NULL;
 }
 
 static void *newmclipadr(FileData *fd, void *adr)      /* used to restore movie clip data after undo */
 {
 	if (fd->movieclipmap && adr)
-		return oldnewmap_lookup_and_inc(fd->movieclipmap, adr);
+		return oldnewmap_lookup_and_inc(fd->movieclipmap, adr, true);
 	return NULL;
 }
 
 static void *newpackedadr(FileData *fd, void *adr)      /* used to restore packed data after undo */
 {
 	if (fd->packedmap && adr)
-		return oldnewmap_lookup_and_inc(fd->packedmap, adr);

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list