javascript After Effects使角色装备无效

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript After Effects使角色装备无效相关的知识,希望对你有一定的参考价值。

app.beginUndoGroup("Add character")

var activeComp = app.project.activeItem;
var wiggleExpression = 'seedRandom(index);wiggle(thisComp.layer("Controller").effect("Freq")("Slider"), thisComp.layer("Controller").effect("Amp")("Slider"))'

// Adding controller layer
var controllerLayer = activeComp.layers.addNull(activeComp.duration);
controllerLayer.name = "Controller";
effect = controllerLayer.Effects.addProperty("Slider Control");
effect.name = "Freq"
effect.property("Slider").setValue(1)
effect = controllerLayer.Effects.addProperty("Slider Control");
effect.name = "Amp"
effect.property("Slider").setValue(8)
effect = controllerLayer.Effects.addProperty("Slider Control");
effect.name = "Wiggle"
effect.property("Slider").expression = wiggleExpression

// Adding character layer
var characterLayer = activeComp.layers.addNull(activeComp.duration);
characterLayer.name = "- character";
characterLayer.moveAfter(controllerLayer)

// Adding body layer
var bodyLayer = activeComp.layers.addNull(activeComp.duration);
bodyLayer.name = "-- body";
bodyLayer.parent = characterLayer
bodyLayer.moveAfter(characterLayer)
bodyLayer.transform.rotation.expression = wiggleExpression

// Adding head layer
var headLayer = activeComp.layers.addNull(activeComp.duration);
headLayer.name = "-- head";
headLayer.parent = bodyLayer
headLayer.moveAfter(bodyLayer)
headLayer.transform.rotation.expression = wiggleExpression



app.endUndoGroup()

以上是关于javascript After Effects使角色装备无效的主要内容,如果未能解决你的问题,请参考以下文章

After Effects / ExtendScript:使用库和导入 .jsx 文件?

after effects cs6 绿色版下载|Adobe after effects(AE)cs6

影视后期认识After Effects

After Effects 作为后端电影引擎?

在 After Effects 中以编程方式更改 TextLayer 的文本

Premiere&After Effects的实时预览插件开发