[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56320] branches/soc-2011-tomato: Merging r56307 through r56319 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Fri Apr 26 17:54:15 CEST 2013


Revision: 56320
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56320
Author:   nazgul
Date:     2013-04-26 15:54:15 +0000 (Fri, 26 Apr 2013)
Log Message:
-----------
Merging r56307 through r56319 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/bundle.cc
    branches/soc-2011-tomato/source/blender/blenkernel/intern/CCGSubSurf.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c
    branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_subdivide.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_loopcut.c
    branches/soc-2011-tomato/source/blender/editors/render/render_preview.c
    branches/soc-2011-tomato/source/blender/editors/space_nla/nla_buttons.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/rectop.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_modifier.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nla.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_solidify.c
    branches/soc-2011-tomato/source/blender/render/intern/source/imagetexture.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-56306
   + /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-56319

Modified: branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/bundle.cc
===================================================================
--- branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/bundle.cc	2013-04-26 15:43:20 UTC (rev 56319)
+++ branches/soc-2011-tomato/extern/libmv/libmv/simple_pipeline/bundle.cc	2013-04-26 15:54:15 UTC (rev 56320)
@@ -83,6 +83,10 @@
     x[1] += R_t[4];
     x[2] += R_t[5];
 
+    // Prevent bundles from being moved behind the camera.
+    if (x[2] < T(0))
+      return false;
+
     // Compute normalized coordinates: x /= x[2].
     T xn = x[0] / x[2];
     T yn = x[1] / x[2];

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/CCGSubSurf.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/CCGSubSurf.c	2013-04-26 15:43:20 UTC (rev 56319)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/CCGSubSurf.c	2013-04-26 15:54:15 UTC (rev 56320)
@@ -20,6 +20,9 @@
  * float.h's FLT_EPSILON causes trouble with subsurf normals - campbell */
 #define EPSILON (1.0e-35f)
 
+/* With this limit a single triangle becomes over 3 million faces */
+#define CCGSUBSURF_LEVEL_MAX 11
+
 /***/
 
 typedef unsigned char byte;
@@ -229,7 +232,7 @@
 int ccg_gridsize(int level)
 {
 	BLI_assert(level > 0);
-	BLI_assert(level <= 31);
+	BLI_assert(level <= CCGSUBSURF_LEVEL_MAX + 1);
 
 	return (1 << (level - 1)) + 1;
 }
@@ -245,7 +248,7 @@
 static int ccg_edgesize(int level)
 {
 	BLI_assert(level > 0);
-	BLI_assert(level <= 30);
+	BLI_assert(level <= CCGSUBSURF_LEVEL_MAX + 1);
 	
 	return 1 + (1 << level);
 }
@@ -254,7 +257,7 @@
 {
 	BLI_assert(high_level > 0 && low_level > 0);
 	BLI_assert(high_level >= low_level);
-	BLI_assert((high_level - low_level) <= 30);
+	BLI_assert((high_level - low_level) <= CCGSUBSURF_LEVEL_MAX);
 
 	return 1 << (high_level - low_level);
 }
@@ -262,7 +265,7 @@
 static int ccg_edgebase(int level)
 {
 	BLI_assert(level > 0);
-	BLI_assert(level <= 30);
+	BLI_assert(level <= CCGSUBSURF_LEVEL_MAX + 1);
 
 	return level + (1 << level) - 1;
 }

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c	2013-04-26 15:43:20 UTC (rev 56319)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c	2013-04-26 15:54:15 UTC (rev 56320)
@@ -1115,6 +1115,50 @@
 	return 1;
 }
 
+
+/* Ensure that strip doesn't overlap those around it after resizing by offsetting those which follow */
+static void nlastrip_fix_resize_overlaps(NlaStrip *strip)
+{
+	/* next strips - do this first, since we're often just getting longer */
+	if (strip->next) {
+		NlaStrip *nls = strip->next;
+		float offset = 0.0f;
+		
+		if (strip->end > nls->start) {
+			/* NOTE: need to ensure we don't have a fractional frame offset, even if that leaves a gap,
+			 * otherwise it will be very hard to get rid of later
+			 */
+			offset = ceilf(strip->end - nls->start);
+			
+			/* apply to times of all strips in this direction */
+			for (; nls; nls = nls->next) {
+				nls->start += offset;
+				nls->end   += offset;
+			}
+		}
+	}
+	
+	/* previous strips - same routine as before */
+	/* NOTE: when strip bounds are recalculated, this is not considered! */
+	if (strip->prev) {
+		NlaStrip *nls = strip->prev;
+		float offset = 0.0f;
+		
+		if (strip->start < nls->end) {
+			/* NOTE: need to ensure we don't have a fractional frame offset, even if that leaves a gap,
+			 * otherwise it will be very hard to get rid of later
+			 */
+			offset = ceilf(nls->end - strip->start);
+			
+			/* apply to times of all strips in this direction */
+			for (; nls; nls = nls->prev) {
+				nls->start -= offset;
+				nls->end   -= offset;
+			}
+		}
+	}
+}
+
 /* Recalculate the start and end frames for the current strip, after changing
  * the extents of the action or the mapping (repeats or scale factor) info
  */
@@ -1138,6 +1182,9 @@
 	/* adjust endpoint of strip in response to this */
 	if (IS_EQF(mapping, 0.0f) == 0)
 		strip->end = (actlen * mapping) + strip->start;
+	
+	/* make sure we don't overlap our neighbours */
+	nlastrip_fix_resize_overlaps(strip);
 }
 
 /* Is the given NLA-strip the first one to occur for the given AnimData block */
@@ -1634,7 +1681,22 @@
 	if ((adt->flag & ADT_NLA_EDIT_ON) == 0)
 		return;
 		
-	/* TODO: need to sync the user-strip with the new state of the action! */
+	/* sync the length of the user-strip with the new state of the action
+	 * but only if the user has explicitly asked for this to happen
+	 * (see [#34645] for things to be careful about)
+	 */
+	if ((adt->actstrip) && (adt->actstrip->flag & NLASTRIP_FLAG_SYNC_LENGTH)) {
+		strip = adt->actstrip;
+		
+		/* must be action-clip only (transitions don't have scale) */
+		if ((strip->type == NLASTRIP_TYPE_CLIP) && (strip->act)) {
+			/* recalculate the length of the action */
+			calc_action_range(strip->act, &strip->actstart, &strip->actend, 0);
+			
+			/* adjust the strip extents in response to this */
+			BKE_nlastrip_recalculate_bounds(strip);
+		}
+	}
 
 	/* for all Tracks, clear the 'disabled' flag
 	 * for all Strips, clear the 'tweak-user' flag

Modified: branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_subdivide.c
===================================================================
--- branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_subdivide.c	2013-04-26 15:43:20 UTC (rev 56319)
+++ branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_subdivide.c	2013-04-26 15:54:15 UTC (rev 56320)
@@ -1086,10 +1086,12 @@
 
 			for (j = 0; j < BLI_array_count(loops_split); j++) {
 				if (loops_split[j][0]) {
+					BMFace *f_new;
 					BLI_assert(BM_edge_exists(loops_split[j][0]->v, loops_split[j][1]->v) == NULL);
-
-					/* BMFace *f_new = */ /* UNUSED */
-					BM_face_split(bm, face, loops_split[j][0]->v, loops_split[j][1]->v, &l_new, NULL, false);
+					f_new = BM_face_split(bm, face, loops_split[j][0]->v, loops_split[j][1]->v, &l_new, NULL, false);
+					if (f_new) {
+						BMO_elem_flag_enable(bm, l_new->e, ELE_INNER);
+					}
 				}
 			}
 
@@ -1183,28 +1185,8 @@
 		/* deselect input */
 		BM_mesh_elem_hflag_disable_all(bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT, false);
 
-		for (ele = BMO_iter_new(&iter, op.slots_out, "geom_inner.out", BM_EDGE | BM_VERT); ele; ele = BMO_iter_step(&iter)) {
-			BM_elem_select_set(bm, ele, true);
-
-			if (ele->head.htype == BM_VERT) {
-				BMEdge *e;
-				BMIter eiter;
-
-				BM_ITER_ELEM (e, &eiter, ele, BM_EDGES_OF_VERT) {
-					if (!BM_elem_flag_test(e, BM_ELEM_SELECT) &&
-					     BM_elem_flag_test(e->v1, BM_ELEM_SELECT) &&
-					     BM_elem_flag_test(e->v2, BM_ELEM_SELECT))
-					{
-						BM_edge_select_set(bm, e, true);
-					}
-					else if (BM_elem_flag_test(e, BM_ELEM_SELECT) &&
-					         (!BM_elem_flag_test(e->v1, BM_ELEM_SELECT) ||
-					          !BM_elem_flag_test(e->v2, BM_ELEM_SELECT)))
-					{
-						BM_edge_select_set(bm, e, false);
-					}
-				}
-			}
+		for (ele = BMO_iter_new(&iter, op.slots_out, "geom_inner.out", BM_EDGE); ele; ele = BMO_iter_step(&iter)) {
+			BM_edge_select_set(bm, (BMEdge *)ele, true);
 		}
 	}
 


Property changes on: branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c: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/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-56306
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c: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/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-56319

Modified: branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_loopcut.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_loopcut.c	2013-04-26 15:43:20 UTC (rev 56319)
+++ branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_loopcut.c	2013-04-26 15:54:15 UTC (rev 56320)
@@ -299,8 +299,12 @@
 			/* tessface is already re-recalculated */
 			EDBM_update_generic(em, false, true);
 
+			/* we cant slide multiple edges in vertex select mode */
+			if ((cuts > 1) && (em->selectmode & SCE_SELECT_VERTEX)) {
+				/* dont flush vertex selection when we have multiple cuts, otherwise we can't slide */
+			}
 			/* force edge slide to edge select mode in in face select mode */
-			if (EDBM_selectmode_disable(lcd->vc.scene, em, SCE_SELECT_FACE, SCE_SELECT_EDGE)) {

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list