Skip to content

Add "Reverse" value node - #199

Merged
morevnaproject merged 12 commits into
synfig:masterfrom
lemmabit:permutator_reverse
Aug 10, 2015
Merged

morevnaproject merged 12 commits into
synfig:masterfrom
lemmabit:permutator_reverse

Conversation

@lemmabit

@lemmabit lemmabit commented Aug 9, 2015

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Member

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

@d-j-a-y

d-j-a-y commented Sep 6, 2015

Copy link
Copy Markdown
Contributor

@morevnaproject

Copy link
Copy Markdown
Member

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

genete commented Sep 7, 2015

Copy link
Copy Markdown
Member

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 [email protected]:

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

@lemmabit
lemmabit deleted the permutator_reverse branch October 24, 2015 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants