Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Reverse" value node #199

Merged
merged 12 commits into from Aug 10, 2015

Conversation

Projects
None yet
4 participants
@Permutatrix
Copy link
Contributor

commented Aug 9, 2015

This patch adds a general-purpose value node for reversing things. It operates on every type I could figure out how to reverse: lists, strings, spline points and segments, gradients, width points, and dash items. When reversing a list, it also reverses the individual elements of that list, meaning that, for instance, a spline will look exactly the same after being reversed. There's also some special behavior to make DILists and WPLists work as expected; you can look at the code if you really want to get into the details.

I'll note that, though most value nodes try to construct themselves in a way that preserves the value that was there before, this one does not. I thought it would be convenient to be able to reverse any value just by converting it to a Reverse node and then back again.

I'm planning to make an "Append" value node next. Combined with the "Reverse" node, this will allow functionality equivalent to Inkscape's "Fill Between Many" path effect. (Yay, ponies! Seriously, though, that's the best explanation I could find.)

@morevnaproject morevnaproject merged commit 45aa96f into synfig:master Aug 10, 2015

@morevnaproject

This comment has been minimized.

Copy link
Member

commented Aug 10, 2015

Merged now. Thank you for the contribution!
P.S. The idea with 'Append' looks cool.

@d-j-a-y

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2015

Hello .... just in case if you don't read the tracker ....
(bug report) http://www.synfig.org/issues/thebuggenie/synfig/issues/894

see'ya !

@d-j-a-y

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2015

@morevnaproject

This comment has been minimized.

Copy link
Member

commented Sep 6, 2015

Note about the part 1 of the issue #894: The handles appear grey because the Reverse convert type doesn't support reverse manipulations. Every convert type that doesn't support reverse manipulations turns handles into grey. So it's not really bug. We have many convert types without reverse manipulations.

@genete

This comment has been minimized.

Copy link
Member

commented Sep 7, 2015

Hi there!
Good contributions folks!
I've not compiled/test the "Reverse" value node yet but I guess that it
offers the following result:
Reverse of (item 1, item 2, item 3, item 4)= (item 4, item 3, item 2, item
1)
If I understood correctly, I wonder if it would be a good complement to
create a "Reverse" action. In many cases the user just want the reverse
result and would like to have the result in the current working list. It
would be a little hard to make a full reverse of an animated spline, due to
the interrelation of the items with the previous and the forth but I think
it would eliminate the inability of reverse manipulation the "Reversed"
value nodes.

Cheers!

2015-09-06 16:22 GMT+02:00 Konstantin Dmitriev notifications@github.com:

Note about the part 1 of the issue #849: The handles appear grey because
the Reverse convert type doesn't support reverse manipulations. Every
convert type that doesn't support reverse manipulations turns handles into
grey. So it's not really bug. We have many convert types without reverse
manipulations.


Reply to this email directly or view it on GitHub
#199 (comment).

Carlos

@Permutatrix Permutatrix deleted the Permutatrix:permutator_reverse branch Oct 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.