Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
1

How to modify parameters such as color temperature through api

Community Beginner ,
Feb 12, 2025 Feb 12, 2025

I need to control component parameters like color temperature by calling the api and trying property.setValue but that doesn't seem to work. The strange thing is that setValue can control the motion position, how should I implement this function?

function _getSelectedClip() {
var selection = app.project.activeSequence.getSelection();
for (var i = 0; i < selection.length; i++) {
var clip = selection[i];
if (clip.mediaType === "Video") {
return clip;
}
}
return null;
}
var clip = _getSelectedClip();
$.writeln(clip.name);
// 查找组件
function findComponent(clip, matchName) {
var components = clip.components;
for (var i = 0; i < components.numItems; i++) {
if (components[i].matchName === matchName) {
return components[i];
}
}
return null;
}
// 查找属性
function findProperty(clip, matchName, propertyIndex) {
var component = findComponent(clip, matchName);
if (!component) return null;
var properties = component.properties,
property = properties[propertyIndex];
// return component.properties[propertyIndex];
return property;
}
var property = findProperty (clip, 'AE.ADBE Motion', 0);
var value = 0;
if(typeof property.getValue() == 'object') {
value = property.getValue()[0] + 1;
}

property.setValue([value,value]);
$.writeln(property.displayName + ':'+property.getValue());

TOPICS
SDK
181
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Feb 13, 2025 Feb 13, 2025

While motion uses simple data types for its parameters, many effects (including Lumetri) use 'arbitrary data type' parameters; valid param values cannot be generated from outside the effect.

Translate
Community Expert ,
Feb 12, 2025 Feb 12, 2025

setValue seems to work for Motion properties, but not for Lumetri properties,

need to edit your script ... property.setValue([value,value]) in Lumetri you don't have value,value,

Lumetri properties are different form position and scale that have x,y etc...

And I think instead of calling AE.ADBE Motion, you should be calling 'Lumetri'

or something like that...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 13, 2025 Feb 13, 2025

While motion uses simple data types for its parameters, many effects (including Lumetri) use 'arbitrary data type' parameters; valid param values cannot be generated from outside the effect.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2025 Feb 13, 2025

Sorry, I am a new cep developer and don't quite understand what you mean. Is there any example code for me to learn

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 14, 2025 Feb 14, 2025
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2025 Feb 13, 2025

My code above is just an example, and when I changed it to Lumetri it still didn't work

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines