Илья Дударь Asked:2020-09-28 19:58:09 +0000 UTC2020-09-28 19:58:09 +0000 UTC 2020-09-28 19:58:09 +0000 UTC 如何通过 Adobe After Effects 中的脚本分配位置值? 772 假设在 opacity 参数中我可以安全地编写: transform.opacity = 50; 物体将是半透明的!但是使用 position 参数,这不再起作用了....我是这样写的: transform.position[0] = 400; transform.position[1] = 400; 但是该对象甚至没有移动并且显示错误... javascript 1 个回答 Voted Best Answer Greg-- 2020-09-28T21:46:38Z2020-09-28T21:46:38Z 而不是这一切 transform.position[0] = 400; transform.position[1] = 400; 简单地写[400,400] 这就是你指定x和y的方式,[x,y]或者[x,y,z] 更多细节可以在文档中找到 在文档的示例中,有一行: temp = thisComp.layer("Layer 1").transform.position[1]; [temp, temp] 其中transform.position[1]- 这是一个 getter(我们得到值y слоя 1)[temp, temp]- 一个 setter(我们也为x这个y元素设置了值)
而不是这一切
简单地写
[400,400]
这就是你指定x和y的方式,[x,y]
或者[x,y,z]
更多细节可以在文档中找到
在文档的示例中,有一行:
其中
transform.position[1]
- 这是一个 getter(我们得到值y
слоя 1
)[temp, temp]
- 一个 setter(我们也为x
这个y
元素设置了值)