Login | Register 
Products Applications Downloads Features Wiki forum Store
 

Merge DATs odd/even

Helpful techniques for working with TouchDesigner. Answers only, no questions.

Merge DATs odd/even

Postby kinglevel » Thu Dec 22, 2011 4:54 pm

Hey


I got stuck with this problem, i wanna merge two dats odd/evenly.

like this:

Dat 1
a
b
c
d

Dat 2

1
2
3
4

Result

a
1
b
2
c
3
d
4

cheers!
kinglevel
 
Posts: 28
Joined: Mon Jul 04, 2011 11:45 am

Re: Merge DATs odd/even

Postby Achim » Fri Dec 23, 2011 11:10 am

easiest way would be this
Attachments
merge.toe
(3.33 KiB) Downloaded 30 times
User avatar
Achim
 
Posts: 1510
Joined: Wed Nov 14, 2007 12:52 pm

Re: Merge DATs odd/even

Postby kinglevel » Fri Dec 23, 2011 3:20 pm

Achim wrote:easiest way would be this



aah! Brilliant! :D
thanks
kinglevel
 
Posts: 28
Joined: Mon Jul 04, 2011 11:45 am

Re: Merge DATs odd/even

Postby selina » Tue Dec 27, 2011 9:16 pm

you can skip merge2 & 3 if you use the Concatenate Cell option in merge 1.
User avatar
selina
Staff
 
Posts: 369
Joined: Tue Nov 13, 2007 12:15 am

Re: Merge DATs odd/even

Postby kinglevel » Tue Dec 27, 2011 9:23 pm

selina wrote:you can skip merge2 & 3 if you use the Concatenate Cell option in merge 1.


hm ok.

btw, this method does not work with tables with multiple columns.
kinglevel
 
Posts: 28
Joined: Mon Jul 04, 2011 11:45 am

Re: Merge DATs odd/even

Postby selina » Wed Dec 28, 2011 5:56 pm

if you want to merge tables with multiple columns, you can use reorder DATs to add an extra column, an eval DAT to put row numbers into that column, and then merge the 2 dats, sort by row number, and finally delete the row number column. slightly convoluted, example attached.

Selina
Attachments
reorder_merge_sort.toe
(3.43 KiB) Downloaded 26 times
User avatar
selina
Staff
 
Posts: 369
Joined: Tue Nov 13, 2007 12:15 am

Re: Merge DATs odd/even

Postby kinglevel » Thu Dec 29, 2011 9:39 am

selina wrote:if you want to merge tables with multiple columns, you can use reorder DATs to add an extra column, an eval DAT to put row numbers into that column, and then merge the 2 dats, sort by row number, and finally delete the row number column. slightly convoluted, example attached.

Selina



ah! thats it, this is way better.
I didnt think of line numbers, great technique.
kinglevel
 
Posts: 28
Joined: Mon Jul 04, 2011 11:45 am


Return to Techniques

Who is online

Users browsing this forum: No registered users and 1 guest