15
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

TouchDesignerでPythonコードとDAT間で入出力する

15
Last updated at Posted at 2018-02-16

Table DAT→Python(Text DAT)入力

スクリーンショット 2018-02-16 9.39.41.png 1と2をPythonを使って足してほしいとき、みなさんもこれまでの人生何度もあったと思います

そんなときはこう

input
n = op('table1')[0,0] + op('table2')[0,0]
print(n)

★[縦,横]です

スクリーンショット 2018-02-16 9.41.11.png ⌘+Rしましょう

答えは

スクリーンショット 2018-02-16 9.43.29.png 世界に平和が訪れた

Python(Text DAT)→Table DAT出力

スクリーンショット 2018-02-16 9.34.57.png 1+1の計算結果をPythonで知りたいとき、みなさんもこれまでの人生何度もあったと思います スクリーンショット 2018-02-16 9.35.59.png 普通に⌘+RでRun Scriptすれば スクリーンショット 2018-02-16 9.36.04.png Textportで結果を見られます。 スクリーンショット 2018-02-16 9.45.15.png でもなんとしてもtable3に入れてほしいときが、あなたの人生にも訪れると思います

そんなときはこう

output
n = 1+1
op('table3')[0,0] = n

マジかそんな簡単でええんか…と思いましたがいいようです
参考:http://derivative.ca/Forum/viewtopic.php?f=27&t=9721

スクリーンショット 2018-02-16 9.49.21.png

答えは

1518742113493.gif
世界に平和が訪れた

moviefilein1とかのときはop( 'moviefilein1' ).par.file = urlみたいにパラメータ指定して入れてあげるとできちゃうみたいです。みなさま快適な入出力ライフを

15
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?