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

AE project path: expression script

New Here ,
Aug 24, 2017 Aug 24, 2017

Is there any way to get AE project path from exprssion script?

2.9K
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
Mentor ,
Aug 24, 2017 Aug 24, 2017

I don't think so. You need a script for 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
LEGEND ,
Aug 24, 2017 Aug 24, 2017

Expressions cannot access project items, only scripts. As I already said in your other post you must not mix up those things. Look up the app.project.path() method in the scripting guide, should you realyl mean scripts.

Mylenium

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
Mentor ,
Aug 24, 2017 Aug 24, 2017

Mylenium​

I wonder if it's possible to eval() a *.jsx within an expression? I think I have seen something like that once...

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
New Here ,
Aug 24, 2017 Aug 24, 2017

How to connect the script file to ae project ?

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
Mentor ,
Aug 24, 2017 Aug 24, 2017

You don't *connect a script to a project*. You add the script to the script folder or scriptUI folder and then launch the script within AE. The UI of the script appears, if it has one, or it just executes and do whatever it should do.

I have never done this, but AE supports start-up scripts, which run automatically on every launch of AE. Maybe this gets you close to what you want.

What are you trying to achieve? Maybe there is an other way to do it?!

Cheers,

*Martin

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
New Here ,
Aug 24, 2017 Aug 24, 2017

Currently we are using this expression code to get some text information from comment.txt file:

var aa = $.evalFile("file://C:/node/templates/2/comment.txt");

...

The matter is that we need to pass the path of the comment.txt at runtime.
For that purpose we assume to  use script,  and from script declare a variable which can be used here as a path for comments.txt file.  When we would like to access app.project we get an error that app is not visible in ae scope, but the app visible in toolkit
SO is there some way how we can organize to get this path "file://C:/node/templates/2/comment.txt" dynamicly ?

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
Mentor ,
Aug 24, 2017 Aug 24, 2017

hmm... you can write a script, that goes along the project path to get to your text file. Each project will have it's own text file and after your mastered relative paths with javascript, you'll probably find your project specific text file.

But now you can't give this variable to an expression. But you can use your script to create an expression, which will have the path. As an alternative, you can pass this path as string into a textlayers property "sourceText", and read it out by an other layers expression. But this is just a longer way of my first suggestion.

I'm not sure, that you actual mean with "at runtime", because everything is happening at runtime in java-universe. You don't have to compile anything.

Cheers,

*Martin

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
New Here ,
Aug 24, 2017 Aug 24, 2017

Thank you very much for suggestion. We are running after effects from cmd as soon as get the date required to be rendered in AE so saying runtime I mean each time when we run AE for new rendering content

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
Mentor ,
Aug 25, 2017 Aug 25, 2017

I already thought so myself.

You have to find out, if AE runs a startup script, when you call aerender.exe from cmd. Otherwise, you have to find a way to create ready-to-render project files.

I think I have an idea of what you want to do, so maybe one of those plugins might be helpful:

Templater Rig - aescripts + aeplugins - aescripts.com

CompsFromSpreadsheet 5 - aescripts + aeplugins - aescripts.com

Cheers,

*Martin

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
New Here ,
Dec 22, 2017 Dec 22, 2017

Hi. did you find the solution? I'm with the same problem using aerender

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 ,
Sep 11, 2017 Sep 11, 2017

Hi narinet,

Sorry for this issue. Did you ever find a solution? Please let us know if our experts’ advice helped you or if you still need help.

Thanks,

Kevin

Kevin Monahan - Sr. Community & Engagement Strategist – Pro Video and Audio
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
Explorer ,
Jun 01, 2020 Jun 01, 2020
LATEST
thisProject.fullPath
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