Forgot attachment ---------- Forwarded message ---------- From: Carlos López González <genet...@gmail.com> Date: 2014-03-31 17:08 GMT+02:00 Subject: Value Node from File To: "synfig-devl@lists.sourceforge.net" <synfig-devl@lists.sourceforge.net>
Hi! I'm going to start developing a new convert type that would allow to read the values for a parameter or value node from a text file. I want to make it the simplest way possible so I've narrowed the format of the file and the supported types to this: Supported types: bool, integer, real, angle, time, vector, color, string. File format: A line with the frame rate (like the lst file): FPS 24 Another line with the type of the data (one of these): TYPE REAL TYPE BOOL TYPE INTEGER TYPE ANGLE TYPE TIME TYPE VECTOR TYPE COLOR TYPE STRING and several lines with the entry: FRAME VALUE where VALUE can be: REAL (for Real, Time and Angle) 0 or 1 (for bool) INTEGER (for integer) REAL REAL (for vector) REAL REAL REAL [REAL] (for color, interpreted as RGB[A] alpha optional) STRING (a group of words until the end of line for strings) Attached is a dummy file for example for each type. Internally it would create an Animated Value Node the first time the data is read from the file. The interpolation used for the waypoints of the Animated Value Node would be a subparameter of the Convert type. Also a Offset time would be available as subparameter to shift the animation to other different time. I would like to know other's opinion or suggestions before start to code. -- Carlos http://synfig.org -- Carlos http://synfig.org
# Lines starting with # are ignored FPS 25 TYPE REAL #TYPE BOOL #TYPE INTEGER #TYPE ANGLE #TYPE TIME #TYPE VECTOR #TYPE COLOR #TYPE STRING #INTERPOLATION CONSTANT #INTERPOLATION TCB #INTERPOLATION LINEAR #INTERPOLATION EASE INTERPOLATION CLAMPED # FORMAT (tabulation or space separated): # FRAME VALUE VALUE # ## REAL, TIME or ANGLE 0 0.3456 12 4.023 20 -0.78454 ## BOOL 0 1 12 0 20 0 ## INTEGER 0 34 12 2 20 -4 ## VECTOR (X, Y) 0 2.564 -3.8709 12 0.000 3.567 20 0.125 6.0342 # COLOR (R, G, B, [A]) 0 0.564 0.8709 0.3456 12 0.000 3.567 0.7830 1.000 20 0.925 0.0342 0.2314 0.7807 ## STRING 0 This is a long string 12 The string goes from the FPS to the end of line 20 Empty strings are alloed too 35
------------------------------------------------------------------------------
_______________________________________________ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl