Difference between revisions of "Talk:Convert"
m |
m |
||
Line 1: | Line 1: | ||
− | == | + | == Timed Swap's Brokenness == |
− | + | The "Timed Swap" convert crashes synfig as soon as it is used. | |
− | + | The problem seems to be with ValueNode_TimedSwap::set_swap_length() and ValueNode_TimedSwap::set_swap_time() which both try to check that the type of their argument is correct, but fail to do so. | |
− | + | == The Feature Itself - Proposed Additions == | |
− | + | While useful, it appears a little incomplete. Suppose I want to fix one of a polygon's vertices such that it always forms a 90 degree angle with the vertex before it, and is a set distance from that vertex. I could do that if I could work out the angle of the previous side to the horizontal, but that doesn't seem to be possible. Also, while it's possible to use the composite conversion to construct a vector from an X and a Y value, it doesn't seem to be possible to go in the opposite direction. If I have a vector and I want to use just its X coordinate, I don't think I can. | |
− | + | I propose some new conversions: | |
− | + | ''Genete says:'' Let me play with those feature for vertexs and I'll let you know. | |
=== Vector Angle === | === Vector Angle === |
Revision as of 11:32, 6 September 2007
Contents
Timed Swap's Brokenness
The "Timed Swap" convert crashes synfig as soon as it is used.
The problem seems to be with ValueNode_TimedSwap::set_swap_length() and ValueNode_TimedSwap::set_swap_time() which both try to check that the type of their argument is correct, but fail to do so.
The Feature Itself - Proposed Additions
While useful, it appears a little incomplete. Suppose I want to fix one of a polygon's vertices such that it always forms a 90 degree angle with the vertex before it, and is a set distance from that vertex. I could do that if I could work out the angle of the previous side to the horizontal, but that doesn't seem to be possible. Also, while it's possible to use the composite conversion to construct a vector from an X and a Y value, it doesn't seem to be possible to go in the opposite direction. If I have a vector and I want to use just its X coordinate, I don't think I can.
I propose some new conversions:
Genete says: Let me play with those feature for vertexs and I'll let you know.
Vector Angle
Converting an angle parameter to "Vector Angle" adds sub-parameters:
- vector "Vector"
- real "Scalar"
The resulting value is the angle between "Vector" and the horizontal, multiplied by "Scalar":
atan(Vector.Y/Vector.X) * Scalar
Genete says: This would be mathematically unconsistent. Vector angel is already given by atan(Vector.X/Vector.Y). If you multiply it by Scalar then angle would be another thing (I don't know what). For example, Rotate layer have a angle value that is defined by an angle (real value). Its visual control is given by a radial duck attached to the center. If you modify the distance of the duck from the origin the duck will go to a defined (and not modificable) distance, due to the angle is the only useful value of the duck's position.
Also, better use atan2 function (or the defined in the math library) that allow a Y value of 0 without obtaining an exception call.
Vector Length
Converting a real-valued parameter to "Vector Length" adds sub-parameters:
- vector "Vector"
- real "Scalar"
The resulting value is the length of "Vector", multiplied by "Scalar":
|Vector| * Scalar
Vector X
Converting a real parameter to "Vector X" adds sub-parameters:
- vector "Vector"
- real "Scalar"
The return value is:
Vector.X * Scalar
Vector Y
Converting a real parameter to "Vector Y" adds sub-parameters:
- vector "Vector"
- real "Scalar"
The return value is:
Vector.Y * Scalar
Questions
The "Convert" menu allows you to specify that the parameter should be controlled automatically in various ways. Ok, but once the parameter is converted to the other(s) one(s), how can it be automatically controlled? Maybe the parameter is now controlled by waypoints and keyframes as the normal parameters?. I'm interested into this feature because I have found that some layers (Eg. Curve Gradient) donesn't work properly in the version I have of synfigstudio (Vertices are "Unknown type". I hope using "convert" can arrange it and use some types of layers that seems that the default values are incorrectly set. Bye, Genete.
- What version to do use? When you convert the parameter, all existing waypoints for that parameter are deleted (I think) and you won't be allowed to edit that parameter directly any more. Instead, you edit the new sub-parameters.
- Suppose you have a circle. Right-click its radius and convert to linear. Switch to animate-edit-mode, set the default interpolation type to be Constant (that's the very bottom setting in the toolbox window) and at time zero, set the rate to be 0.5 and the offset to be 0.5. That means the radius starts at 0.5 units and grows by 0.5 every second. You might have your parameters to be displayed in 'points' or some other unit. You can change that from the toolbox using File>Setup>Misc>Unit System. Set that to Units for this example. Don't forget to set it back after if you want to work in points again.
- You'll see that there are now waypoints on the 'offset' and 'rate' parameters, and you can animate those parameters just like you could animate the radius before.
- Go forward to 1s in the animation. You'll see that the circle's radius is now 1 (it grew by 0.5u from 0.5u), and set the rate to -0.5 and the offset to 1.5. This will cause the circle's radius to start shrinking by 0.5 per second from the 1s point onwards. The 1.5 offset is to arrange that the radius doesn't jump suddenly at 1s. If the radius is to go down from 1.0 at 1s at 0.5 per second, it would have been at 1.5 at 0s, so that's the offset we use.
- Does that make sense? -- dooglus
- I still having 0.61.05 (apr 29 2007). I hope can update ASAP.
- Regarding "Convert" WOW! it is wonderful! absolutely amazing. It opens lots of new possibilities. Thanks for document it. - Genete
Can converted parameters be linked to other objects's normal/converted parameters?
One suggestion for the initial description: To convert the value back to its original type, select "Disconnect" from its context menu. I would add: Disconnect would loose all the waypoints of the converted parameters and don't produce a conversion of the inserted waypoints. BTW it could be a very cool feature.
Also I don't know if conversion would maintain the waypoints of the original parameters. If not it would be also a cool feature.