Help us understand the problem. What is going on with this article?

[aftereffects] コピペで使えるスクリプト 3Dレイヤーの位置を乱数配置 

More than 1 year has passed since last update.

コピペ用

複数の3Dレイヤーの位置(ポジションXYZ)を乱数でランダムに配置
乱数のmaxはrandom(num)のnum引数で渡す

bandicam 2018-10-31 10-42-06-861.jpg

//グローバル変数
var myComp =  app.project.activeItem;
var myLayer = myComp.selectedLayers;
//メソッド
function random (num){
    var random = Math.floor( Math.random() * (num+1) );
    return random;
}


for ( var i = 0 ; i < myLayer.length ; i++ ){
    var myPos = myLayer[i].property("ADBE Transform Group").property("ADBE Position");
    myPos.setValue([random(1920),random(1080),random(5000)])
}
TimeToEdit
現在timetoeditという名前でyoutubeでtutorialやテンプレート動画を作ってます。 https://www.youtube.com/c/TimeToEdit 基本的に自分用のメモです。
https://www.youtube.com/c/TimeToEdit
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした