You do not want to use bpy.types.SoundSequence here! It’s a type (and used this way, a constructor), not a data access!

You are probably looking for something like that:

for seq in bpy.context.sequence_editor.sequences:
    if seq.type is 'SOUND':
        print(seq.volume)

(Loop over that for all your frames of course).

Bastien

On 20/10/2013 03:08, flavio soares wrote:
Hi,

The audio exporter to Ardour is pretty much done <https://github.com/szaszak/blender_velvet/blob/blue_velvet/blue_velvet.py> and fully functional.

I'm trying to expand it to get the audio fade keyframes, but it seems it is not possible.

This code for example:

for i in bpy.context.sequences:
    bpy.context.scene.frame_current = i.frame_start
    start = i.frame_start
    while start < i.frame_final_end:
        print(bpy.types.SoundSequence(i).volume)
        bpy.context.scene.frame_current += 1
        start +=1

Prints only:

0.0
0.0
0.0
etc

...when it should recognize the changes in volume (keyframes) and print something like:

0.0
0.3
0.6
1.0
1.0
etc


Any guesses why this is so?

Thanks for the help. =)


_______________________________________________
Bf-python mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-python
_______________________________________________
Bf-python mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-python

Reply via email to