ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Errors when trying to create/add a Pseudo Effect

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Christopher Bly
Errors when trying to create/add a Pseudo Effect
on Apr 30, 2018 at 2:43:44 pm

This is my first time working with pseudo effects and I just can't get this one working and I can't seem to figure out why. Hoping someone who knows them a bit better could give me a helping hand.

The XML for the effect I'm trying to add looks like this: (Substituted ^'s for <'s because those break the post and cause text to disappear)

^Effect matchname='Pseudo/Gameshow_Controls_3Lights' name='$$$/AE/Preset/GameShowMatteControls=Game Show Matte Controls'>
^Slider name='$$$/AE/Preset/EdgeThickness=Edge Thickness' default='50' valid_min='0' valid_max='1000' slider_min='0' slider_max='100' precision='2'/>
^Slider name='$$$/AE/Preset/Skew=Skew' default='0' valid_min='-1000' valid_max='1000' slider_min='-100' slider_max='100' precision='2'/>
^Slider name='$$$/AE/Preset/MatteXValue=Matte X Value' default='1250' valid_min='0' valid_max='50000' slider_min='0' slider_max='1920' precision='2'/>
^Slider name='$$$/AE/Preset/MatteYValue=Matte Y Value' default='120' valid_min='0' valid_max='50000' slider_min='0' slider_max='1080' precision='2'/>
^Slider name='$$$/AE/Preset/MatteRoundness=Matte Roundness' default='40' valid_min='0' valid_max='50000' slider_min='0' slider_max='200' precision='2'/>
^Group name='$$$/AE/Preset/ColorControls=Color Controls'>
^Color name='$$$/AE/Preset/EdgeColor=Edge Color' default_red='255' default_green='106' default_blue='0'/>
^Color name='$$$/AE/Preset/BKGDColor=BKGD Color' default_red='255' default_green='0' default_blue='0'/>
^Color name='$$$/AE/Preset/LightColor1=Light Color 1' default_red='229' default_green='224' default_blue='195'/>
^Color name='$$$/AE/Preset/LightColor2=Light Color 2' default_red='229' default_green='224' default_blue='195'/>
^Color name='$$$/AE/Preset/LightColor3=Light Color 3' default_red='229' default_green='224' default_blue='195'/>
^/Group>
^Group name='$$$/AE/Preset/LightControls=Light Controls'>
^Slider name='$$$/AE/Preset/LightsScale1=Lights Scale 1' default='125' valid_min='0' valid_max='10000' slider_min='0' slider_max='300' precision='2'/>
^Slider name='$$$/AE/Preset/LightsScale2=Lights Scale 2' default='125' valid_min='0' valid_max='10000' slider_min='0' slider_max='300' precision='2'/>
^Slider name='$$$/AE/Preset/LightsScale3=Lights Scale 3' default='125' valid_min='0' valid_max='10000' slider_min='0' slider_max='300' precision='2'/>
^Slider name='$$$/AE/Preset/LightsOpacity1=Lights Opacity 1' default='100' valid_min='0' valid_max='100' slider_min='0' slider_max='100' precision='1'/>
^Slider name='$$$/AE/Preset/LightsOpacity2=Lights Opacity 2' default='100' valid_min='0' valid_max='100' slider_min='0' slider_max='100' precision='1'/>
^Slider name='$$$/AE/Preset/LightsOpacity3=Lights Opacity 3' default='100' valid_min='0' valid_max='100' slider_min='0' slider_max='100' precision='1'/>
^Slider name='$$$/AE/Preset/LightsGap=Lights Gap' default='40' valid_min='0' valid_max='10000' slider_min='0' slider_max='250' precision='2'/>
^Slider name='$$$/AE/Preset/LightsGap=Lights Offset' default='0' valid_min='-10000' valid_max='10000' slider_min='-500' slider_max='500' precision='2'/>
^/Group>
^Group name='$$$/AE/Preset/GradientControls=Gradient Controls'>
^Angle name='$$$/AE/Preset/EdgeGradientAngle=Edge Gradient Angle' default='90'/>
^Angle name='$$$/AE/Preset/BKGDGradientAngle=BKGD Gradient Angle' default='90'/>
^/Group>
^Group name='$$$/AE/Preset/AnchorPointControls=Anchor Point Controls'>
^Checkbox name='$$$/AE/Preset/xLeft=xLeft' checked='false'/>
^Checkbox name='$$$/AE/Preset/xRight=xRight' checked='false'/>
^Checkbox name='$$$/AE/Preset/yTop=yTop' checked='false'/>
^Checkbox name='$$$/AE/Preset/yBottom=yBottom' checked='false'/>
^/Group>
^/Effect>


and I'm trying to insert it into AE using the ExtendScript Toolkit via this like of code:
app.project.activeItem.layer(1).effect.addProperty("Pseudo/Gameshow_Controls_3Lights");

When I run the script in ExtendScript I've gotten two different errors, I can't tell what I'm changing that makes either appear instead of the other. The errors are "After Effects error: Can not add a property with the name "Pseudo/Gameshow_Controls_3Lights" to this PropertyGroup" and "null is not an object".
Anyone have any idea what I'm doing wrong and how to fix this? Any replies are much appreciated! Thanks!


Return to posts index

Andrei Popa
Re: Errors when trying to create/add a Pseudo Effect
on May 3, 2018 at 1:40:10 pm

Try app.project.activeItem.layer(1).effect.addProperty("Game Show Matte Controls")
I also had this problem when trying to add it using the matchname but when i used the display name, it worked.

Andrei
My Envato portfolio.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]