diff options
author | Joerg Mueller <nexyon@gmail.com> | 2009-12-24 17:01:22 +0300 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2009-12-24 17:01:22 +0300 |
commit | a2b0020e11e27c6d7ecdacf747a4543ab733867b (patch) | |
tree | 2739db8b8e5cec0dba71434b72f7436c2eef3061 /source/blender/editors | |
parent | bb452f29d6c8bce1c34ba56f521e2876377e6bda (diff) |
Reverted the addition of the f-curve sound modifier (was added in revision 24759) due to unusability and performance issues. The ability to use a sound as animation source will be added as an import operator later that renders a sound to an f-curve which brings the advantage that you can edit the generated curve later and the disadvantage it is not automatically updated when the sound changes.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/fmodifier_ui.c | 49 | ||||
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_buttons.c | 2 |
4 files changed, 6 insertions, 49 deletions
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index ebddcd45a8b..3ba20ca3e88 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -321,45 +321,6 @@ static void draw_modifier__noise(uiLayout *layout, ID *id, FModifier *fcm, short /* --------------- */ -/* draw settings for sound modifier */ -static void draw_modifier__sound(const bContext *C, uiLayout *layout, ID *id, FModifier *fcm, short width) -{ - FMod_Sound *data= (FMod_Sound *)fcm->data; - PointerRNA ptr; - - /* init the RNA-pointer */ - RNA_pointer_create(id, &RNA_FModifierSound, fcm, &ptr); - - /* sound */ - uiTemplateID(layout, (bContext*)C, &ptr, "sound", NULL, "sound.open", NULL); - - if (data->sound) - { - /* only sounds that are cached can be used, so display error if not cached */ - if (data->sound->cache) - { - /* blending mode */ - uiItemR(layout, NULL, 0, &ptr, "modification", 0); - - /* settings */ - uiItemR(layout, NULL, 0, &ptr, "strength", 0); - uiItemR(layout, NULL, 0, &ptr, "delay", 0); - } - else - { - PointerRNA id_ptr; - - RNA_id_pointer_create((ID *)data->sound, &id_ptr); - - /* error message with a button underneath allowing users to rectify the issue */ - uiItemL(layout, "Sound must be cached.", ICON_ERROR); - uiItemR(layout, NULL, 0, &id_ptr, "caching", UI_ITEM_R_TOGGLE); - } - } -} - -/* --------------- */ - #define BINARYSEARCH_FRAMEEQ_THRESH 0.0001 /* Binary search algorithm for finding where to insert Envelope Data Point. @@ -623,7 +584,7 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor /* --------------- */ -void ANIM_uiTemplate_fmodifier_draw (const bContext *C, uiLayout *layout, ID *id, ListBase *modifiers, FModifier *fcm) +void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifiers, FModifier *fcm) { FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm); uiLayout *box, *row, *subrow; @@ -704,15 +665,11 @@ void ANIM_uiTemplate_fmodifier_draw (const bContext *C, uiLayout *layout, ID *id case FMODIFIER_TYPE_LIMITS: /* Limits */ draw_modifier__limits(box, id, fcm, width); break; - + case FMODIFIER_TYPE_NOISE: /* Noise */ draw_modifier__noise(box, id, fcm, width); break; - - case FMODIFIER_TYPE_SOUND: /* Sound */ - draw_modifier__sound(C, box, id, fcm, width); - break; - + default: /* unknown type */ break; } diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 48e2eff0d31..b971abac995 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -428,7 +428,7 @@ void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d); /* F-MODIFIER TOOLS */ /* draw a given F-Modifier for some layout/UI-Block */ -void ANIM_uiTemplate_fmodifier_draw(const struct bContext *C, struct uiLayout *layout, struct ID *id, ListBase *modifiers, struct FModifier *fcm); +void ANIM_uiTemplate_fmodifier_draw(struct uiLayout *layout, struct ID *id, ListBase *modifiers, struct FModifier *fcm); /* ************************************************* */ /* ASSORTED TOOLS */ diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 1eaac8ffd20..3faba9bbba7 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -452,7 +452,7 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa) for (fcm= fcu->modifiers.first; fcm; fcm= fcm->next) { col= uiLayoutColumn(pa->layout, 1); - ANIM_uiTemplate_fmodifier_draw(C, col, ale->id, &fcu->modifiers, fcm); + ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm); } MEM_freeN(ale); diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index e8eca9de281..df791297967 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -434,7 +434,7 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa) for (fcm= strip->modifiers.first; fcm; fcm= fcm->next) { col= uiLayoutColumn(pa->layout, 1); - ANIM_uiTemplate_fmodifier_draw(C, col, strip_ptr.id.data, &strip->modifiers, fcm); + ANIM_uiTemplate_fmodifier_draw(col, strip_ptr.id.data, &strip->modifiers, fcm); } } |