Highlighted

Error: Having to focus on ourselves (76:: 59)

Community Beginner ,
Jul 30, 2020

Copy link to clipboard

Copied

We are building an extension for after effect and at some point we are polling a text layer SourceText property.

If we click in the text layer while reading the SourceText property we get this error.

 

Screen Shot 2020-07-30 at 3.25.52 PM.png

 

Is there a way of preventing this ?

Or is there a way of knowing when the focus is this layer by any events ?

 

Any help is welcomed 

Thanks

mat

 

 

TOPICS
Error or problem, Scripting

Views

138

Likes

Translate

Translate

Report

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

Error: Having to focus on ourselves (76:: 59)

Community Beginner ,
Jul 30, 2020

Copy link to clipboard

Copied

We are building an extension for after effect and at some point we are polling a text layer SourceText property.

If we click in the text layer while reading the SourceText property we get this error.

 

Screen Shot 2020-07-30 at 3.25.52 PM.png

 

Is there a way of preventing this ?

Or is there a way of knowing when the focus is this layer by any events ?

 

Any help is welcomed 

Thanks

mat

 

 

TOPICS
Error or problem, Scripting

Views

139

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 30, 2020 0
Most Valuable Participant ,
Jul 31, 2020

Copy link to clipboard

Copied

Without any idea about your code nobody can tell you anything.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2020 0
Community Beginner ,
Jul 31, 2020

Copy link to clipboard

Copied

if you call this in jsx scripting (we calling a jsx function every second executing this call)

 

let textDocument = layer.property("Source Text").value as TextDocument;

 

while the type tool is selected and you click in the text layer tou will get the popup.

 

Screen Shot 2020-07-31 at 10.52.21 AM.pngScreen Shot 2020-07-31 at 10.52.14 AM.png 

 

If we remove this call then the error goes away

Hope this help.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2020 0
Most Valuable Participant ,
Jul 31, 2020

Copy link to clipboard

Copied

Why would you even want to convert a value into an object? That makes no sense to me. You need to use string operations and such and append the data to a text file, which seems to be what you are actually looking for.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2020 0
Mateo666 LATEST
Community Beginner ,
Jul 31, 2020

Copy link to clipboard

Copied

Im not sure if i follow you but we need the TextDocument for further operation

 

isPointText = !!textDocument && !textDocument.boxText;

 

whats wrong with this

http://docs.aenhancers.com/other/textdocument/

 

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2020 0