Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-03-06 01:42:17 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-03-06 01:42:17 +0400
commit3f04564724523685e1c8ab2696aa1eb36bd85a05 (patch)
treef3f7329be10525718fbaf7f7998e0de8c9f593ba /source/blender/editors
parente2003f9a6c0ad1f2b03821f2c8aaa91565c51c40 (diff)
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
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/transform/transform.c10
-rw-r--r--source/blender/editors/transform/transform_conversions.c5
2 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index dc012619ba4..8c690268444 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -4721,7 +4721,10 @@ void projectSVData(TransInfo *t, int final)
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 @@ static int doEdgeSlide(TransInfo *t, float perc)
}
}
- 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;
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 93be921a2bd..4e51462921c 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -4889,6 +4889,10 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
}
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 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
projectSVData(t, FALSE);
}
}
+#endif
}
}