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:
authorJoerg Mueller <nexyon@gmail.com>2009-12-24 17:01:22 +0300
committerJoerg Mueller <nexyon@gmail.com>2009-12-24 17:01:22 +0300
commita2b0020e11e27c6d7ecdacf747a4543ab733867b (patch)
tree2739db8b8e5cec0dba71434b72f7436c2eef3061 /source/blender/editors/animation/fmodifier_ui.c
parentbb452f29d6c8bce1c34ba56f521e2876377e6bda (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/animation/fmodifier_ui.c')
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c49
1 files changed, 3 insertions, 46 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;
}