From 3116062a828e24ed2e91c219ab338a38030f2f42 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 12 Jul 2009 02:06:15 +0000 Subject: 2.5: Couple of small fun features * Text window font size now supports full range 8-32, instead of just 12 and 15. I added BLF_fixed_width to get the character width of a fixed size font. * Buttons do undo push on change again. * Animated/Keyframe/Driver colors are now themable, with blend value to blend with original color. Set this to 0.5 now to give colors less constrast. * Fix tooltip popping up with RMB menu open, and missing redraw. * Autokeyframe now works for buttons. * Driver expressions can be edited in place in a button now. (still some refresh issues). * Also made python driver default for the Add Driver function in the RMB button. This way you don't have to open a Graph editor if you just want to type an expression. Also, the default expression then is the current value. * Tooltips now show some extra info, not sure what is good to have, but currently I added: * Shortcut key for operator buttons. * Python struct & property name for RNA buttons. * Expression for driven values. * Value for text/search/pointer buttons. --- source/blender/editors/transform/transform.h | 1 - .../editors/transform/transform_conversions.c | 21 ++++----------------- 2 files changed, 4 insertions(+), 18 deletions(-) (limited to 'source/blender/editors/transform') diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index ed825886a05..00353cfc457 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -510,7 +510,6 @@ void transform_autoik_update(TransInfo *t, short mode); int count_set_pose_transflags(int *out_mode, short around, struct Object *ob); /* auto-keying stuff used by special_aftertrans_update */ -short autokeyframe_cfra_can_key(struct Scene *scene, struct Object *ob); void autokeyframe_ob_cb_func(struct Scene *scene, struct View3D *v3d, struct Object *ob, int tmode); void autokeyframe_pose_cb_func(struct Scene *scene, struct View3D *v3d, struct Object *ob, int tmode, short targetless_ik); diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 60d209ae2db..2262c6cdeaa 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4312,21 +4312,6 @@ static void clear_trans_object_base_flags(TransInfo *t) } } -/* auto-keyframing feature - checks for whether anything should be done for the current frame */ -// TODO: this should probably be done per channel instead... -short autokeyframe_cfra_can_key(Scene *scene, Object *ob) -{ - float cfra= (float)CFRA; // XXX for now, this will do - - /* only filter if auto-key mode requires this */ - if (IS_AUTOKEY_ON(scene) == 0) - return 0; - else if (IS_AUTOKEY_MODE(scene, NORMAL)) - return 1; - else - return id_frame_has_keyframe(&ob->id, cfra, ANIMFILTER_KEYS_LOCAL); -} - /* auto-keyframing feature - for objects * tmode: should be a transform mode */ @@ -4335,7 +4320,8 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode) ID *id= &ob->id; FCurve *fcu; - if (autokeyframe_cfra_can_key(scene, ob)) { + // TODO: this should probably be done per channel instead... + if (autokeyframe_cfra_can_key(scene, id)) { AnimData *adt= ob->adt; float cfra= (float)CFRA; // xxx this will do for now short flag = 0; @@ -4436,7 +4422,8 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode, bPoseChannel *pchan; FCurve *fcu; - if (autokeyframe_cfra_can_key(scene, ob)) { + // TODO: this should probably be done per channel instead... + if (autokeyframe_cfra_can_key(scene, id)) { float cfra= (float)CFRA; short flag= 0; char buf[512]; -- cgit v1.2.3