Skip to content

Instantly share code, notes, and snippets.

@deathponta
Last active October 5, 2017 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deathponta/a7f3c61c8b27993fa87c0b9f6588e699 to your computer and use it in GitHub Desktop.
Save deathponta/a7f3c61c8b27993fa87c0b9f6588e699 to your computer and use it in GitHub Desktop.
再帰処理で子をすべて取得。
/*
再帰処理で子をすべて取得。
この方法だと、オブジェクトのクラスなどによって、フィルタリングすることもできるはず!
*/
childrens = #() -- 子を入れる箱を用意
fn GetChild _p =(
for c in _p.children do(
Append childrens c
GetChild c
)
)
GetChild $ -- 初回呼び出し
Select childrens -- 上で集めたオブジェクトをすべて選択
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment