Hi Hermann,
I'm really sorry, but I am cut out with a bit of "real" work at the moment.
I am suprised and glad to find that the "CTRL" key does something.
I don't have that much knowledge of beizer curves myself, (and was
planning to read up) and so can't really comment on your ideas.
I just played with the "CTRL" key ability a bit just then and noticed:
* The control lines can be difficult to distinguish from the center, I
found that changing the code in the in and out handle drawing routines
according to:
commenting out the set_color(BLACK)... draw_line... draw_box
changing the draw_box to a draw_circle
made the control lines thinner (no black shadow) and distingished
(circle instead of a box)
* It is only the y-co-ordinate of the auto that is used for the beizer
curves. I was expecting to get a linear slope by pointing the controls
at the left keyframe, (i.e. having the correct angle). I guess this
relates to point (3) of your comments which you seem to understand much
greater than I do at the moment (need to do other work!!).
In regards to:
There seems to be another Problem: If I am informed right, Cinelerra uses this
bezier-courve
feature for all Plugin Autos as well. Is this correct??
No, I don't think so... UHH I was just looking at rotate.C for my
example and notice a lot of class definitition that should be in rotate.h!
Anyhow, to prove that interpolation is done per plugin, (and that the
auto's use a seperate beizer control) look at the function:
RotateConfig::interpolate() in plugins/rotate/rotate.C
and you'll see that the rotate plugin uses it's own beizer curve function.
If you would like, we could "combine forces" in some way!
I would propose, to proceed in rather small steps
(1) fix the initial value of new keyframes to be such as to yield a
smooth courve while taking into account the positions of the
immediate neibouring keyframes
I was actually thinking, why not make it "not a smooth curve"
initially. (i.e. a linear displacement) I don't know what other
professional packages do, but to me it seems that I would prefer to
start with lines, and then smooth them if desired.
In this regard, to me, having the beizer control point at x,y=0 should
make a straight line between keyframes, (similar to inkscape...)
(2) add a "Mode" to each keyframe. This mode can be:
- smoth (default)
- linear
- free
Add this three modes to the context menu of the keyframes.
Whenever a keyframe is modifyed by ctrl-dragging the handles
with the mouse, its Mode switches to "free"
extend the "smoth" mode such as to readjust the control points
(i.e. the slope) if any of the neibouring keyframes is modified.
I am not sure, but I think looking at how inkscape does it is a good
idea. I personally think that conforming to inkscape / sodipodi's
method would result in less confusion.
In inkscape:
Draw a beizer curve with 3 control points. Not that it is initially
linear if you don't drag the mouse while making the control points. If
you do, you are controlling a gradient with fixed length.
Then "editing path nodes":
(i) All the nodes don't show the beizer control unless they are
selected (reduces clutter, would be good in cinelerra as well!)
(ii) Selecting multiple nodes with the "shift key", and then moving
one nodes moves all nodes simultaneosly (would be good in cin as well)
(iii) Each nodes is defined as a "corner (left and right handles
independent)", "smooth (gradient of the controls on either side same)"
and "symmetric (gradient and length on either side the same)"
(iiiv) There are buttons that "make segment lines" and "make selected
segment curves". These enforce a linear (both controls at origin), and
for the "make curves" forces the controls out w/out changing the curve,
(i.e. still linear)
(3) Extending the keframe editing code in the way you proposed to go some way
into
the direction of common graphics programs like inkscape or corel draw or
the like...
Oh, didn't erad that when you where writing up about inkscape...
What do you think of this proposal?
Sounds good, I am busy... will look at it over the next few days and get
back to you..
Pierre
_______________________________________________
Cinelerra mailing list
[email protected]
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra