[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48255] branches/soc-2011-tomato: svn merge ^/trunk/blender -r48245:48254

Campbell Barton ideasman42 at gmail.com
Mon Jun 25 09:41:09 CEST 2012


Revision: 48255
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48255
Author:   campbellbarton
Date:     2012-06-25 07:41:01 +0000 (Mon, 25 Jun 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r48245:48254

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

Modified Paths:
--------------
    branches/soc-2011-tomato/doc/python_api/examples/bpy.types.Mesh.py
    branches/soc-2011-tomato/intern/ffmpeg/ffmpeg_compat.h
    branches/soc-2011-tomato/release/scripts/modules/bpy_extras/mesh_utils.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_multires.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/library.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/multires.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/particle.c
    branches/soc-2011-tomato/source/blender/blenlib/BLI_array.h
    branches/soc-2011-tomato/source/blender/editors/include/ED_object.h
    branches/soc-2011-tomato/source/blender/editors/mesh/meshtools.c
    branches/soc-2011-tomato/source/blender/editors/object/object_edit.c
    branches/soc-2011-tomato/source/blender/editors/object/object_modifier.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_select.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_mask.c
    branches/soc-2011-tomato/source/blender/python/intern/stubs.c
    branches/soc-2011-tomato/source/blender/render/intern/source/render_texture.c
    branches/soc-2011-tomato/source/blenderplayer/bad_level_call_stubs/stubs.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-48245
   + /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-48254

Modified: branches/soc-2011-tomato/doc/python_api/examples/bpy.types.Mesh.py
===================================================================
--- branches/soc-2011-tomato/doc/python_api/examples/bpy.types.Mesh.py	2012-06-25 07:25:44 UTC (rev 48254)
+++ branches/soc-2011-tomato/doc/python_api/examples/bpy.types.Mesh.py	2012-06-25 07:41:01 UTC (rev 48255)
@@ -17,7 +17,7 @@
 only a reference to loops that the polygon uses.
 
 :class:`Mesh.loops`, :class:`Mesh.uv_layers` :class:`Mesh.vertex_colors` are all aligned so the same polygon loop
-indicies can be used to find the UV's and vertex colors as with as the vertices.
+indices can be used to find the UV's and vertex colors as with as the vertices.
 
 To compare mesh API options see: :ref:`NGons and Tessellation Faces <info_gotcha_mesh_faces>`
 

Modified: branches/soc-2011-tomato/intern/ffmpeg/ffmpeg_compat.h
===================================================================
--- branches/soc-2011-tomato/intern/ffmpeg/ffmpeg_compat.h	2012-06-25 07:25:44 UTC (rev 48254)
+++ branches/soc-2011-tomato/intern/ffmpeg/ffmpeg_compat.h	2012-06-25 07:41:01 UTC (rev 48255)
@@ -80,12 +80,24 @@
 #endif
 
 #if ((LIBAVFORMAT_VERSION_MAJOR > 53) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR > 32)) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR == 24) && (LIBAVFORMAT_VERSION_MICRO >= 100)))
-void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp);
+static inline
+void my_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
+{
+	int i;
 
+	for (i = 0; i < s->nb_streams; i++) {
+		AVStream *st = s->streams[i];
+
+		st->cur_dts = av_rescale(timestamp,
+		                         st->time_base.den * (int64_t)ref_st->time_base.num,
+		                         st->time_base.num * (int64_t)ref_st->time_base.den);
+	}
+}
+
 static inline
 void av_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
 {
-    ff_update_cur_dts(s, ref_st, timestamp);
+	my_update_cur_dts(s, ref_st, timestamp);
 }
 #endif
 

Modified: branches/soc-2011-tomato/release/scripts/modules/bpy_extras/mesh_utils.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy_extras/mesh_utils.py	2012-06-25 07:25:44 UTC (rev 48254)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy_extras/mesh_utils.py	2012-06-25 07:41:01 UTC (rev 48255)
@@ -19,6 +19,7 @@
 # <pep8-80 compliant>
 
 __all__ = (
+    "mesh_linked_uv_islands",
     "mesh_linked_tessfaces",
     "edge_face_count_dict",
     "edge_face_count",
@@ -29,6 +30,66 @@
     )
 
 
+def mesh_linked_uv_islands(mesh):
+    """
+    Splits the mesh into connected polygons, use this for seperating cubes from
+    other mesh elements within 1 mesh datablock.
+
+    :arg mesh: the mesh used to group with.
+    :type mesh: :class:`bpy.types.Mesh`
+    :return: lists of lists containing polygon indices
+    :rtype: list
+    """
+    uv_loops = [luv.uv[:] for luv in mesh.uv_layers.active.data]
+    poly_loops = [poly.loop_indices for poly in mesh.polygons]
+    luv_hash = {}
+    luv_hash_get = luv_hash.get
+    luv_hash_ls = [None] * len(uv_loops)
+    for pi, poly_indices in enumerate(poly_loops):
+        for li in poly_indices:
+            uv = uv_loops[li]
+            uv_hub = luv_hash_get(uv)
+            if uv_hub is None:
+                uv_hub = luv_hash[uv] = [pi]
+            else:
+                uv_hub.append(pi)
+            luv_hash_ls[li] = uv_hub
+
+    poly_islands = []
+
+    # 0 = none, 1 = added, 2 = searched
+    poly_tag = [0] * len(poly_loops)
+
+    while True:
+        poly_index = -1
+        for i in range(len(poly_loops)):
+            if poly_tag[i] == 0:
+                poly_index = i
+                break
+
+        if poly_index != -1:
+            island = [poly_index]
+            poly_tag[poly_index] = 1
+            poly_islands.append(island)
+        else:
+            break  # we're done
+
+        added = True
+        while added:
+            added = False
+            for poly_index in island[:]:
+                if poly_tag[poly_index] == 1:
+                    for li in poly_loops[poly_index]:
+                        for poly_index_shared in luv_hash_ls[li]:
+                            if poly_tag[poly_index_shared] == 0:
+                                added = True
+                                poly_tag[poly_index_shared] = 1
+                                island.append(poly_index_shared)
+                    poly_tag[poly_index] = 2
+
+    return poly_islands
+
+
 def mesh_linked_tessfaces(mesh):
     """
     Splits the mesh into connected faces, use this for seperating cubes from

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_multires.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_multires.h	2012-06-25 07:25:44 UTC (rev 48254)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_multires.h	2012-06-25 07:41:01 UTC (rev 48255)
@@ -47,6 +47,9 @@
 /* Delete mesh mdisps and grid paint masks */
 void multires_customdata_delete(struct Mesh *me);
 
+void multires_set_tot_level(struct Object *ob,
+							struct MultiresModifierData *mmd, int lvl);
+
 void multires_mark_as_modified(struct Object *ob, enum MultiresModifiedFlags flags);
 
 void multires_force_update(struct Object *ob);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c	2012-06-25 07:25:44 UTC (rev 48254)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c	2012-06-25 07:41:01 UTC (rev 48255)
@@ -734,7 +734,7 @@
 
 		/* deactivate zero axises */
 		for (i = 0; i < 3; i++) {
-			if (td[i] < min_dim) {td[i] = 1.0f; axis -= 1; }
+			if (td[i] < min_dim) { td[i] = 1.0f; axis -= 1; }
 		}
 
 		if (axis == 0 || MAX3(td[0], td[1], td[2]) < 0.0001f) {
@@ -2016,11 +2016,11 @@
 
 			/* Dist to second edge	*/
 			t_dist = dist_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[uindex[1]], tface[cPoint->face_index].uv[uindex[2]]);
-			if (t_dist < dist) {e1_index = cPoint->v2; e2_index = cPoint->v3; edge1_index = uindex[1]; edge2_index = uindex[2]; dist = t_dist; }
+			if (t_dist < dist) { e1_index = cPoint->v2; e2_index = cPoint->v3; edge1_index = uindex[1]; edge2_index = uindex[2]; dist = t_dist; }
 
 			/* Dist to third edge	*/
 			t_dist = dist_to_line_segment_v2(pixel, tface[cPoint->face_index].uv[uindex[2]], tface[cPoint->face_index].uv[uindex[0]]);
-			if (t_dist < dist) {e1_index = cPoint->v3; e2_index = cPoint->v1;  edge1_index = uindex[2]; edge2_index = uindex[0]; dist = t_dist; }
+			if (t_dist < dist) { e1_index = cPoint->v3; e2_index = cPoint->v1;  edge1_index = uindex[2]; edge2_index = uindex[0]; dist = t_dist; }
 
 
 			/*
@@ -2284,7 +2284,7 @@
 						u = (dot11 * dot02 - dot01 * dot12) * invDenom;
 						v = (dot00 * dot12 - dot01 * dot02) * invDenom;
 
-						if ((u > 0) && (v > 0) && (u + v < 1)) {isInside = 1; } /* is inside a triangle */
+						if ((u > 0) && (v > 0) && (u + v < 1)) { isInside = 1; } /* is inside a triangle */
 
 						/*  If collision wasn't found but the face is a quad
 						 *	do another check for the second half */
@@ -2304,7 +2304,7 @@
 							u = (dot11 * dot02 - dot01 * dot12) * invDenom;
 							v = (dot00 * dot12 - dot01 * dot02) * invDenom;
 
-							if ((u > 0) && (v > 0) && (u + v < 1)) {isInside = 2; } /* is inside the second half of the quad */
+							if ((u > 0) && (v > 0) && (u + v < 1)) { isInside = 2; } /* is inside the second half of the quad */
 
 						}
 
@@ -2583,7 +2583,7 @@
 	int format = (surface->image_fileformat & MOD_DPAINT_IMGFORMAT_OPENEXR) ? R_IMF_IMTYPE_OPENEXR : R_IMF_IMTYPE_PNG;
 	char output_file[FILE_MAX];
 
-	if (!sData || !sData->type_data) {setError(surface->canvas, "Image save failed: Invalid surface."); return; }
+	if (!sData || !sData->type_data) { setError(surface->canvas, "Image save failed: Invalid surface."); return; }
 	/* if selected format is openexr, but current build doesnt support one */
 	#ifndef WITH_OPENEXR
 	if (format == R_IMF_IMTYPE_OPENEXR) format = R_IMF_IMTYPE_PNG;
@@ -2597,7 +2597,7 @@
 
 	/* Init image buffer	*/
 	ibuf = IMB_allocImBuf(surface->image_resolution, surface->image_resolution, 32, IB_rectfloat);
-	if (ibuf == NULL) {setError(surface->canvas, "Image save failed: Not enough free memory."); return; }
+	if (ibuf == NULL) { setError(surface->canvas, "Image save failed: Not enough free memory."); return; }
 
 	#pragma omp parallel for schedule(static)
 	for (index = 0; index < sData->total_points; index++) {
@@ -3287,7 +3287,7 @@
 									int v1 = mface[hit.index].v1, v2 = mface[hit.index].v2, v3 = mface[hit.index].v3, quad = (hit.no[0] == 1.0f);
 									float dot;
 
-									if (quad) {v2 = mface[hit.index].v3; v3 = mface[hit.index].v4; }
+									if (quad) { v2 = mface[hit.index].v3; v3 = mface[hit.index].v4; }
 									normal_tri_v3(hit.no, mvert[v1].co, mvert[v2].co, mvert[v3].co);
 									dot = ray_dir[0] * hit.no[0] + ray_dir[1] * hit.no[1] + ray_dir[2] * hit.no[2];
 
@@ -3580,7 +3580,7 @@
 
 		/*	for debug purposes check if any NAN particle proceeds
 		 *	For some reason they get past activity check, this should rule most of them out	*/
-		if (isnan(pa->state.co[0]) || isnan(pa->state.co[1]) || isnan(pa->state.co[2])) {invalidParticles++; continue; }

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list