On 9/15/07, Carlos Lopez Gonzalez <[EMAIL PROTECTED]> wrote: > I have other idea:
Hi Carlos. The idea you describe is exactly how I implemented the animation of gradients. I was mailing Ulrik back and forth about how the animation of gradients should look, rather than how it should be implemented, because I thought that would be easier for him to relate to, but something like what you suggested was already forming in my mind. It's available from subversion now - revision 676 and later have animated gradients. TCB, and all the other interpolation modes work, just like for colors, and all other types in Synfig. In the most common case, the 2 gradients will have the same number of CPoints, and they'll be in the same places, so the number of CPoints doesn't actually grow, but in the case where it does I'm doing exactly what you suggested. The only complication is when there are 2 or more CPoints exactly on top of each other. You might think that this isn't useful, but it's how you get sudden changes of color. The 'stripes' valuenode type uses it for example to make its sharp stripey gradients. So when combining two gradients, I look at them both in order, and when I find they both have CPoints at the same point, I take the first CPoint from each at that point and merge them, then the last from each (at that point) and merge them. I'm currently throwing any extra ones away. Is there any need for more than 2 CPoints at the same position? Chris. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Synfig-user mailing list Synfig-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-user