Results 1 to 2 of 2
  1. #1
    Member mythcat's Avatar
    Join Date
    Aug 2006
    Location
    Fălticeni
    Posts
    196

    Add images with bpy.ops.sequencer.image_strip_add

    I want to make a script to add all images from folder : C:\tmp into Video Sequence Editor
    using:
    Code:
    bpy.ops.sequencer.image_strip_add
    I search on forum and internet and the result is just this: https://developer.blender.org/T43736

    How can I do that ?

    Thank you. Best regards.



  2. #2
    Member mythcat's Avatar
    Join Date
    Aug 2006
    Location
    Fălticeni
    Posts
    196
    I try this source of code but I got errors:

    Code:
    import bpy
    import os
    
    dir="C:/tmp/"  #not include files
    dirproxy="C:/tmp/" #including proxy file
    
    file=[]
    print ("aaa")
    for i in os.listdir(dir):
        print(i)
        frame={"name":i}
        print(frame)
        file.append(frame)
        print(file)
        bpy.ops.sequencer.image_strip_add( \
            directory = dir, \
            files=i,\
            frame_start=0,\
            channel=0, \
            filemode=9)\
    This is the output:
    Code:
    0001.png
    {'name': '0001.png'}
    [{'name': '0001.png'}]
    
    Traceback (most recent call last):
      File "<blender_console>", line 12, in <module>
      File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\modules\bpy\ops.py", line 189, in __call__
        ret = op_call(self.idname_py(), None, kw)
    RuntimeError: Operator bpy.ops.sequencer.image_strip_add.poll() failed, context is incorrect



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •