qmasingarbe / pymiere

Python for Premiere pro
GNU General Public License v3.0
376 stars 50 forks source link

How to lock audio track? #73

Open juniorbraun opened 1 year ago

juniorbraun commented 1 year ago

Hey mate, How to lock all the audio tracks? When I import a video files that has sound on them I don't want the sound to be on track. So if I lock the audio tracks the audio won't be imported?

Thanks in advance.

hedley-david commented 1 year ago

Info on this page: https://ppro-scripting.docsforadobe.dev/sequence/track.html

will allow you to select whether to mute the audio when adding to a timeline, or to only insert video to a sequence, if that's what your Q? refers to. I have used just about all of those commands successfully in my scripts.

I don't believe there is current support for altering the source tracks attached to source files directly.

juniorbraun commented 1 year ago

Thanks you so much for your help! some of the lines are working well and as expected. I'm a novice trying new things. The ones now working are the ones that start with "app" like the following app.project.save() It says that "app" is not defined. Could you help me? Regards

hedley-david commented 1 year ago

the whole path to "app" is: pymiere.objects.app

so if your code says import pymiere

you can add this under it so app.project.save() knows what to call for. app = pymiere.objects.app

then it should work.

juniorbraun commented 1 year ago

Mate, than you so much once again. I'm still having the same issue. NameError: name 'app' is not defined

The line bellow.

import pymiere
app.setWorkspace("Editing")

hedley-david commented 1 year ago

import pymiere app = pymiere.objects.app app.setWorkspace("Editing")

That should do it! :)

juniorbraun commented 1 year ago

Amazing! you're a pro mate. Thank you so much! That worked well.

juniorbraun commented 1 year ago

Mate, thanks for your help so far. How do I close the project without saving the changes? All the options I found was to save the changes on the original project file. Any help?

hedley-david commented 1 year ago

Change the word 'save' to 'close', that ought to do it.

You're most welcome, happy coding!

On Thu, Oct 26, 2023 at 9:19 AM juniorbraun @.***> wrote:

Mate, thanks for your help so far. How do I close the project without saving the changes? All the options I found was to save the changes on the original project file. Any help?

— Reply to this email directly, view it on GitHub https://github.com/qmasingarbe/pymiere/issues/73#issuecomment-1781110436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYNR5IKJXUWDXT5HTNXDFYLYBJPORAVCNFSM6AAAAAA6IZQI7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGEYTANBTGY . You are receiving this because you commented.Message ID: @.***>

juniorbraun commented 1 year ago

Unfortunately it doesn't work. I have tried, close, quit, No but nothing seems to work. I also tried looking on Script guide but the only option is to save ;(