Difference between revisions of "ValueNode"

From Synfig Studio :: Documentation
Jump to: navigation, search
m
 
m (Add data linking category)
 
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
A ValueNode is a value that changes over time.
+
{{Category|Glossary}}
 +
{{NewTerminology}}
 +
{{Category|Data Linking}}
 +
<!-- End Page info -->
 +
 
 +
A {{l|ValueNode}} is a value that can change over time.
 +
 
 +
A {{l|ValueNode}} represents a description of a value and how it changes (or doesn't!) over time.
 +
 
 +
{{l|ValueNode|ValueNodes}} are the things we see as the value for every parameter of every {{l|Layers|layer}}.  The {{l|Waypoint|waypoints}} visible in the {{l|Timetrack Panel}} are also part of the {{l|ValueNode}} - waypoints are how Animated {{l|ValueNode|ValueNodes}} work out what value to be at each point in time.
 +
 
 +
Each {{l|ValueNode}} (and hence each {{l|Parameter}} in Synfig has one of 13 {{l|Dev:Types|Types}}.
 +
 
 +
=Kinds of ValueNodes=
 +
 
 +
There are three kinds of {{l|ValueNode|ValueNodes}} in Synfig.  In the following examples the {{l|ValueNode}}'s type is a [http://en.wikipedia.org/wiki/Real_number real number] in each case:
 +
 
 +
== Constant ValueNodes ==
 +
 
 +
These have a single value for all time, and no waypoints.  An example of such a {{l|ValueNode}} would be:
  
An example of a ValueNode would be:
 
 
  "3.4, for ever"
 
  "3.4, for ever"
  
A more complex example:
+
== Animated ValueNodes ==
"3.4 at the beginning of the animation,
+
 
 +
These have {{l|Waypoints}} that specify their value at particular points in time.  For times which don't have a value specified, the value is calculated by interpolating between the waypoints.  An example would be:
 +
 
 +
"3.4 at the beginning of the animation,
 
  move smoothly up to 7.6 at time = 10 seconds,
 
  move smoothly up to 7.6 at time = 10 seconds,
 
  then jump instantly to 2.0
 
  then jump instantly to 2.0
 
  and stay there until the end of time"
 
  and stay there until the end of time"
  
These are both descriptions of a value (in this case a [http://en.wikipedia.org/wiki/Real_number real number]) and how it changes (or doesn't!) over time.
+
== Converted ValueNodes ==
 +
 
 +
These are {{l|ValueNode|ValueNodes}} which have been {{l|Convert|Converted}} into sub-parameters, each of which is itself a {{l|ValueNode}}.  Right-clicking on a parameter and selecting a type from the 'convert' sub-menu allows you to convert a {{l|ValueNode}}.  Converted {{l|ValueNode|ValueNodes}} don't have waypoints themselves, but their sub-parameters may do.  An example would be:
 +
  "start at 3.4 and linearly increase by 1.2 per second"
 +
 
 +
=Actions on ValueNodes=
 +
 
 +
==Convert==
 +
{{l|Convert|Converts}} a {{l|ValueNode}} into a Linkable type. It disconnects from the previous value node then creates a new Linkable {{l|ValueNode}} and connects the parameter to that new nalue node.
 +
 
 +
==Disconnect==
 +
Creates a Constant value node based on the value of the parameter at the frame where the action is executed. It disconnect from the previous value node and connect the parameter to that new constant value node.
  
ValueNodes are the things we see as the value for every parameter of every layer. The waypoints visible in the timetrack dialog are also part of the ValueNode - waypoints are how ValueNodes work out what value to be at each point in time.
+
{{l|ValueNode|ValueNodes}} are not discarded completely until all parameter that were connected to get disconnected. So when you disconnect from a value node it doesn't mean that the {{l|ValueNode}} is completely lost. Maybe other parameters still connected to the value node too, so it is not deleted.
  
=== Types ===
+
==Export==
 +
{{l|Export}}, take a {{l|ValueNode}} (animated, constant or linkable) and labels it with a unique name. The exported {{l|ValueNode}} is now known at any place of the document (by any layer) so any other parameter can Connect to it. All exported {{l|ValueNode|ValueNodes}} are stored in the {{l|Library Panel}}.
  
Each ValueNode (and hence each [[Parameter]] in Synfig has one of 13 types:
+
==Connect==
 +
When a Exported {{l|ValueNode}} is selected in the {{l|Library Panel}} it is available to be {{l|Connect|connected}} to any parameter, so the parameter is plugged to that exported value node. When you Connect a parameter to an exported value node, the parameter is disconnected from the previous value node. Parameters and Exported value nodes can be Connected only of they are type compatible (i.e. angle with angle and not angle with vector)
  
* Bool -- a boolean value; true or false.  Represented in Studio as a checkbox
+
==Link==
* Integer -- an integer value; a whole number.  -3 or 0 or 2 are examples.
+
When two or more parameters are selected at the same time (usually from two layers) it is possible to {{l|Linking|link}} the {{l|ValueNode|ValueNodes}}. In this case all except one of the selected previous parameters are disconnected from its value nodes and then connected to the value node selected from the selected. The decision on which value node is kept and used as link value node is taken inside the code and cannot be user decided (but it should be)
* Real -- a [http://en.wikipedia.org/wiki/Real_number real number]]. -3.0, 0.0, 2.0 and 3.1415 are examples.
+
* Angle -- a real number that is interpreted as an angle
+
* Time -- a time, displayed in days, hours, minutes, seconds and frames
+
* Vector -- a 2d vector.  usually represented as two Reals representing X and Y values
+
* Color -- a color. Usually represented as Red/Green/Blue/Alpha values
+
* Segment -- a single bezier curve segment.  Defined by 4 Vectors, representing 2 Vertices and 2 Tangents
+
* BLinePoint -- a point in a BLine.  Defined by 6 parameters (a Vector defining its location, a Real defining its width, another Real defining its origin, a Bool defining whether its tangents are split or not, and two Vectors defining the direction of its tangents (only the first of which is used if the tangents aren't split)
+
* List -- A list.  For example, an outline's Vertices parameter is simply a list of BLinePoint valuenodes.
+
* Canvas -- A collection of layers.  When you encapsulate layers, you're creating a new inline canvas.  The encapsulation layer has a parameter called 'Canvas' with type 'Canvas' and its value is the group of layers you've encapsulated.
+
* String -- a string of characters, for example "Hello Mum!"
+
* Gradient -- a range of colors (a mapping from a real parameter to a color).  Can be defined in many ways, but is usually editing using the gradient editor.
+

Latest revision as of 10:16, 27 January 2015


A ValueNode is a value that can change over time.

A ValueNode represents a description of a value and how it changes (or doesn't!) over time.

ValueNodes are the things we see as the value for every parameter of every layer. The waypoints visible in the Time Track Panel are also part of the ValueNode - waypoints are how Animated ValueNodes work out what value to be at each point in time.

Each ValueNode (and hence each Parameter in Synfig has one of 13 Types.

Kinds of ValueNodes

There are three kinds of ValueNodes in Synfig. In the following examples the ValueNode's type is a real number in each case:

Constant ValueNodes

These have a single value for all time, and no waypoints. An example of such a ValueNode would be:

"3.4, for ever"

Animated ValueNodes

These have Waypoints that specify their value at particular points in time. For times which don't have a value specified, the value is calculated by interpolating between the waypoints. An example would be:

"3.4 at the beginning of the animation,
move smoothly up to 7.6 at time = 10 seconds,
then jump instantly to 2.0
and stay there until the end of time"

Converted ValueNodes

These are ValueNodes which have been Converted into sub-parameters, each of which is itself a ValueNode. Right-clicking on a parameter and selecting a type from the 'convert' sub-menu allows you to convert a ValueNode. Converted ValueNodes don't have waypoints themselves, but their sub-parameters may do. An example would be:

 "start at 3.4 and linearly increase by 1.2 per second"

Actions on ValueNodes

Convert

Converts a ValueNode into a Linkable type. It disconnects from the previous value node then creates a new Linkable ValueNode and connects the parameter to that new nalue node.

Disconnect

Creates a Constant value node based on the value of the parameter at the frame where the action is executed. It disconnect from the previous value node and connect the parameter to that new constant value node.

ValueNodes are not discarded completely until all parameter that were connected to get disconnected. So when you disconnect from a value node it doesn't mean that the ValueNode is completely lost. Maybe other parameters still connected to the value node too, so it is not deleted.

Export

Export, take a ValueNode (animated, constant or linkable) and labels it with a unique name. The exported ValueNode is now known at any place of the document (by any layer) so any other parameter can Connect to it. All exported ValueNodes are stored in the Library Panel.

Connect

When a Exported ValueNode is selected in the Library Panel it is available to be connected to any parameter, so the parameter is plugged to that exported value node. When you Connect a parameter to an exported value node, the parameter is disconnected from the previous value node. Parameters and Exported value nodes can be Connected only of they are type compatible (i.e. angle with angle and not angle with vector)

Link

When two or more parameters are selected at the same time (usually from two layers) it is possible to link the ValueNodes. In this case all except one of the selected previous parameters are disconnected from its value nodes and then connected to the value node selected from the selected. The decision on which value node is kept and used as link value node is taken inside the code and cannot be user decided (but it should be)