[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44658] trunk/blender/source/blender/ editors/transform: Disable interpolation of customdata layers on edge slide

Sergey Sharybin sergey.vfx at gmail.com
Mon Mar 5 22:42:26 CET 2012


Revision: 44658
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44658
Author:   nazgul
Date:     2012-03-05 21:42:17 +0000 (Mon, 05 Mar 2012)
Log Message:
-----------
Disable interpolation of customdata layers on edge slide

This option might be useful in some cases like keeping UV coordinated in kind of
"correct" state so sliding edge loop will also slide edges in UV. But for other
layers like shapekeys and vertex colors it's arguable it's actually needed.

The way it's currently done isn't actually acceptable because it doesn't take
flags like UVCALC_TRANSFORM_CORRECT into account and also makes extra unwanted
things like interpolating shapekeys which leads to propagating changes into
basis keys and also results with slide applied twice for relative keys because
offset is also applying on loading edit mesh.

Also discussed with Brecht who agreed with marking this things as TODO and
disabling for now.

This should fix issue reported in #30387: Edge Slide propogates to Basis Shape Key

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform.c
    trunk/blender/source/blender/editors/transform/transform_conversions.c

Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c	2012-03-05 21:27:28 UTC (rev 44657)
+++ trunk/blender/source/blender/editors/transform/transform.c	2012-03-05 21:42:17 UTC (rev 44658)
@@ -4721,7 +4721,10 @@
 						continue;  /* shouldn't happen, but protection */
 				}
 				
-				BM_loop_interp_from_face(em->bm, l2, copyf, do_vdata, FALSE);
+				/* do not run interpolation of all layers for now because it's not actually what you'll always expect
+				 * and layers like shapekeys shouldn't be interpolated from here because oherwise they'll
+				 * propagate to basis keys and will propagate twice to related keys (sergey) */
+				// BM_loop_interp_from_face(em->bm, l2, copyf, do_vdata, FALSE);
 
 				if (final) {
 					BM_loop_interp_multires(em->bm, l2, copyf);	
@@ -4855,7 +4858,10 @@
 		}
 	}
 	
-	projectSVData(t, 0);
+	/* BMESH_TODO: simply not all layers should be interpolated from there
+	 * but it's quite complicated to set this up with current API.
+	 * details are in comments in projectSVData function */
+	// projectSVData(t, 0);
 	
 	return 1;
 }

Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c	2012-03-05 21:27:28 UTC (rev 44657)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c	2012-03-05 21:42:17 UTC (rev 44658)
@@ -4889,6 +4889,10 @@
 				}
 				EDBM_automerge(t->scene, t->obedit, 1);
 			}
+#if 0
+			/* BMESH_TODO: simply nothing to cancel from here, but when interpolation of
+			 * some custom layers would be added this code would eb needed
+			 * some details are in comments in projectSVData (sergey) */
 			else {
 				if (t->mode == TFM_EDGE_SLIDE) {
 					SlideData *sld = t->customData;
@@ -4897,6 +4901,7 @@
 					projectSVData(t, FALSE);
 				}
 			}
+#endif
 		}
 	}
 	




More information about the Bf-blender-cvs mailing list