ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Fixing "unterminated string constant" error when parenting clone stamp to tracker

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Gregory Lindsey
Fixing "unterminated string constant" error when parenting clone stamp to tracker
on Dec 6, 2016 at 6:41:32 pm

I am using the clone stamp in combination with tracking data applied to a null object in order to remove objects without using the photoshop method. This method is much better when there are lighting changes and linear camera moves.

The clone stamp is applied to remove the object on the first frame and then I parent the "transform: position" and "clone source: clone position" parameters of the brush stroke to the position keyframes of the null object with the tracking data applied. This moves the brush stroke to wherever the null object is so I use an expression to offset the position of each parameter by the difference in position of the null object and the brush stroke. So far it is ideal when the camera does simple moves like pans or tilts so that clone position and source move together through the frame.

The expression looks like:

thisComp.layer("
logotrack")-[1695.3788-1820.75, 2015.621-2104.25]

Now it gives me an unterminated string constant error. I updated to AE CC 2017 hoping this would fix it but it does not. When I delete the line break in the expression...

thisComp.layer("logotrack")-[1695.3788-1820.75, 2015.621-2104.25]

...it then tells me that the parent layer "logotrack" is missing or does not exist, but it never is. I don't know what's going on and this started happening all of a sudden and is preventing me from finishing my project.

Is there a way to parent the clone brush position and clone source to position data of a null object without running into these errors?


Return to posts index

Dan Ebberts
Re: Fixing "unterminated string constant" error when parenting clone stamp to tracker
on Dec 6, 2016 at 7:03:00 pm

You have to supply a path to a particular property, not just the layer. I'm not sure exactly what you're trying to do, but it should look more like this:

thisComp.layer("logotrack").position-[1695.3788-1820.75, 2015.621-2104.25]

Dan



Return to posts index

Gregory Lindsey
Re: Fixing "unterminated string constant" error when parenting clone stamp to tracker
on Dec 7, 2016 at 4:25:39 pm

I get the same error result. Even if I include "transform.position", it gives me an error when the expression is active for both variations:

thisComp.layer("logotrack").position-[1695.3788-1820.75, 2015.621-2104.25]

thisComp.layer("logotrack").transform.position-[1695.3788-1820.75, 2015.621-2104.25]

It tells me that the layer "logotrack" is missing but it isn't. Am I missing something with the syntax or is this a bug? It works ok on other compositions, but all of a sudden it stopped working. I might have to contact Adobe.


Return to posts index


Dan Ebberts
Re: Fixing "unterminated string constant" error when parenting clone stamp to tracker
on Dec 7, 2016 at 5:14:09 pm

Is it possible that your logotrack layer has a space at the beginning or end of the layer name?

Dan



Return to posts index

Gregory Lindsey
Re: Fixing "unterminated string constant" error when parenting clone stamp to tracker
on Dec 7, 2016 at 7:30:10 pm

Thank you Dan. I thought that might be the issue but I checked and the layer is renamed properly. The same thing is happening across several compositions.

After trying some different code:

deltaX = 1695.3788-1820.75;
deltaY = 2015.621-2104.25;
x = thisComp.layer("logotrack").transform.position[0];
y = thisComp.layer("logotrack").transform.position[1];
[x-deltaX, y-deltaY];

... no such luck. It still gives the error: "Layer named "logotrack" is missing or does not exist"

Have posted a question to the Adobe AE forum here:
https://forums.adobe.com/thread/2247457

A similar problem was posted here and determined to be a bug with macOS and AE 2016:
https://forums.adobe.com/thread/2231165

They recommended updating to AE 2017 but that has not worked for me.

I think i might have to learn a new method, which is a bummer because this method was working perfectly until this started happening. I think it might be a bug. I am using macOS Sierra 10.12.1 and AE 2017 on a 2013 MBP 15" 2.3GHZ i7.


Return to posts index

Dan Ebberts
Re: Fixing "unterminated string constant" error when parenting clone stamp to tracker
on Dec 7, 2016 at 7:49:16 pm

Ah yes, that sounds familiar. I think the work around was to hit backspace before typing the new layer name. Here's that thread:

https://forums.adobe.com/message/9079349#9079349

Dan



Return to posts index

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