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:
authorTon Roosendaal <ton@blender.org>2005-10-30 01:27:07 +0400
committerTon Roosendaal <ton@blender.org>2005-10-30 01:27:07 +0400
commit4664db487297f41c20e30de1598e6f5dadabcd5e (patch)
treedea7fc1ff40c6f33524dc2966216ba74aa1c9197 /source/blender/src/editipo_mods.c
parent4ad59e30a05f10355cf88d8e94dfd51bfbc66ca5 (diff)
SHIFT+S snap to frame for both Action and NLA window.
Diffstat (limited to 'source/blender/src/editipo_mods.c')
-rw-r--r--source/blender/src/editipo_mods.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/src/editipo_mods.c b/source/blender/src/editipo_mods.c
index 468e49b3ec8..fc890a8bd9f 100644
--- a/source/blender/src/editipo_mods.c
+++ b/source/blender/src/editipo_mods.c
@@ -549,8 +549,18 @@ void sethandles_ipo_keys(Ipo *ipo, int code)
}
break;
}
+}
+static int snap_bezier(BezTriple *bezt)
+{
+ if(bezt->f2 & SELECT)
+ bezt->vec[1][0]= (float)(floor(bezt->vec[1][0]+0.5));
+ return 0;
+}
+void snap_ipo_keys(Ipo *ipo)
+{
+ ipo_keys_bezier_loop(ipo, snap_bezier, calchandles_ipocurve);
}
static void ipo_curves_auto_horiz(void)