2
$\begingroup$

How do I get the filepath attribute from a sound strip of a video sequence ? I am talking about the sound strip that comes with a video file.

Sound strip : demo.001 bpy.data.scenes['Scene'].sequence_editor.sequences_all["demo.001"].filepath

==> 'SoundSequence' object has no attribute 'filepath'

I can get the filepath from the associated video strip.

Video strip : demo.avi bpy.data.scenes['Scene'].sequence_editor.sequences_all["demo.avi"].filepath

==> this works

$\endgroup$

1 Answer 1

3
$\begingroup$

You need to access the sound property of that strip which has the filepath property:

bpy.data.scenes['Scene'].sequence_editor.sequences_all["demo.001"].sound.filepath
$\endgroup$
3
  • $\begingroup$ Thanks Ray ! It works ! How did u know ?? $\endgroup$
    – Nikos_VSE
    Commented Nov 13, 2016 at 19:17
  • $\begingroup$ Values in the api are more often than not, represented in the UI as well, which may give hints as to where it might be in the UI. In this case, the filepath in the UI is listed as a property of a sound object (looking at its python tooltip), so I then looked for a sound property on the sequence strip. $\endgroup$ Commented Nov 13, 2016 at 19:26
  • $\begingroup$ Clever... well, thanks again ! I learnt two things today :-) $\endgroup$
    – Nikos_VSE
    Commented Nov 13, 2016 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .