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:
authorJoshua Leung <aligorith@gmail.com>2006-11-09 11:43:27 +0300
committerJoshua Leung <aligorith@gmail.com>2006-11-09 11:43:27 +0300
commit7f0dc54f61cc5b443e2aba09d0d8c06b0c6a718c (patch)
tree4eb04a9694dd89a73f9ab4f011fb9cf20b7e4642 /source/blender/src/header_ipo.c
parentbdadf4fc8321d6870ce1ba12b7ace13f41ddd7db (diff)
This commit adds two of my recent animation editing related patches:
#5061 - Ipo/Action 'Cleaning' #5071 - 'Only Needed' Keyframing Option ==================== * IPO/Action 'Cleaning': It removes un-necessary keyframes from individual ipo curves. - In both editors, the hotkey is currently the OKEY. Also accesable from menus of each editor. - There is currently a 'threshold' popup. This sets the value that the cleaner uses to determine if two keys have same time/value There are a few improvements that could still be made, such as: - There are a few cases that it still doesn't handle yet, such as when un-needed keyframes lie on a linear line (and similiar cases). This shall be improved soon. - Also, for some reason, after running cleaning while in ipo editor editmode, all but the active curve are hidden. ==================== * 'Only Needed' Keyframing Option: This patch adds a new keyframing option for objects and bones. It only adds keyframes where they are needed, judging from the surrounding points on that curve. Notes about this keyframing option: - Works like the existing 'Avail' option, except it checks if the keyframe is needed. - Currently uses hardcoded threshold for determining if same value. [quote] /* Cases where keyframes should not be added: * 1. Keyframe to be added bewteen two keyframes with similar values * 2. Keyframe to be added between two keyframes with similar times * 3. Keyframe lies at point that intersects the linear line between two keyframes */ [/unquote]
Diffstat (limited to 'source/blender/src/header_ipo.c')
-rw-r--r--source/blender/src/header_ipo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/src/header_ipo.c b/source/blender/src/header_ipo.c
index 0a98d10b052..b0e64d77830 100644
--- a/source/blender/src/header_ipo.c
+++ b/source/blender/src/header_ipo.c
@@ -579,6 +579,12 @@ static void do_ipo_editmenu(void *arg, int event)
case 7:
sethandles_ipo(HD_AUTO_ANIM);
break;
+ case 8: /* clean ipo */
+ {
+ SpaceIpo *sipo= curarea->spacedata.first;
+ clean_ipo(sipo->ipo, 1);
+ }
+ break;
}
}
@@ -634,6 +640,7 @@ static uiBlock *ipo_editmenu(void *arg_unused)
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Duplicate|Shift D", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Record Mouse Movement|R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clean IPO Curves|O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete|X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBlockBut(block, ipo_editmenu_joinmenu, NULL, ICON_RIGHTARROW_THIN, "Join", 0, yco-=20, 120, 19, "");