[Bf-blender-cvs] [3d3f82a] master: Transform: fix for fcurve transform crash

Campbell Barton noreply at git.blender.org
Thu Nov 27 19:12:25 CET 2014


Commit: 3d3f82a8df8cd0ec0ac873e1a56a7dc7c4751ba9
Author: Campbell Barton
Date:   Thu Nov 27 19:10:30 2014 +0100
Branches: master
https://developer.blender.org/rB3d3f82a8df8cd0ec0ac873e1a56a7dc7c4751ba9

Transform: fix for fcurve transform crash

counting handles was out of sync, now use exact same logic.

===================================================================

M	source/blender/editors/transform/transform_conversions.c

===================================================================

diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 15876ba..72a2fef 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -3824,33 +3824,19 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
 				const bool sel1 = use_handle ? bezt->f1 & SELECT : sel2;
 				const bool sel3 = use_handle ? bezt->f3 & SELECT : sel2;
 
-				if (is_translation_mode) {
-					/* for 'normal' pivots - just include anything that is selected.
-					 * this works a bit differently in translation modes */
-					if (sel2) {
+				if (!is_translation_mode || !(sel2)) {
+					if (sel1) {
 						count++;
 					}
-					else {
-						if (sel1) count++;
-						if (sel3) count++;
-					}
-				}
-				else if (use_local_center) {
-					/* for local-pivot we only need to count the number of selected handles only,
-					 * so that centerpoints don't get moved wrong
-					 */
-					if (bezt->ipo == BEZT_IPO_BEZ) {
-						if (sel1) count++;
-						if (sel3) count++;
+
+					if (sel3) {
+						count++;
 					}
-					/* else if (sel2) count++; // TODO: could this cause problems? */
-					/* - yes this causes problems, because no td is created for the center point */
 				}
-				else {
-					/* for 'normal' pivots - just include anything that is selected */
-					if (sel1) count++;
-					if (sel2) count++;
-					if (sel3) count++;
+
+				/* only include main vert if selected */
+				if (sel2 && !use_local_center) {
+					count++;
 				}
 			}
 		}




More information about the Bf-blender-cvs mailing list