I was thinking of just adding another section after "Expressions", but perhaps a separare type of Keyframe also would be an option (I think that Expressions and Scripts resides in the same "logical domain", whereas different UI elements, like Views & Documents etc is obviously different.
For example one could add to the existing Objects Keyframe Editor:
- One (multi line) field for RunScripttBefore
- One (multi line) field for RunScriptAfter
- Checkboxes for Activating the scripts.
- Radiobuttons: This KeyframOnly | Run Script from Here, or
Textbox for entering a Keyframe interval.
- Radiobuttons: VBScript | Phyton
Something along those lines.
EXAMPLE OF APPLICAITON
Making changes to a curve (History on) with a Pipe or Lofted surface, could be modified with Script or Grasshopper, for example a curve with hanging cables on a Robot would update according to - not manually set object positions at a keyframe - but according to the Object's changing position and/or directions (like hanging cables being stretched or relaxed depending on IK-chain movements of the parts it is attached to, hence the manual positioning of cables at specific keyframes is hopeless, especially if the animation needs changes...)
This was just a quick and dirty suggestion, but I'll think more about this later.
Addendum: I tried to put some life into a downloaded ABB-robot, and realized that I had to drop the cable (flexible) tubing since the tubing bent in unpredictable ways due to the IK-chain controlling the motion :