[Bf-python] Some bpy.sequencer.ops operators do not work?!

Sybren A. Stüvel sybren at stuvel.eu
Fri May 13 16:39:27 CEST 2016


Hi Ulf,

From which context did you call those operators? My guess is that they
only work from the sequence editor, so not from the Python console
directly.

Sybren

On Thu, May 05, 2016 at 09:44:29AM +0200, Ulf Enhörning wrote:
> Hello, I am developing Python scripts that use the bpy.ops.sequencer
> operators to make cool video editing patterns. I have not found any
> help by googling nor on the forums. Several of the operators give
> the following error message:
> 
> File “C:\Program files\Blender Foundation\Blender\2.77\scripts\modules\bpy\
> ops.py, line 189, in __cal__
> 
> ret = op_call(self.idname_py(), None, kw)
> 
> RuntimeError: Operator bpy.ops.sequencer.effect_strip_add.poll() failed,
> context is incorrect
> 
> Error: Python script fail, look in the console for now...
> 
> 
> Here are a few of the operators that yield the above error message:
> 
> bpy.ops.sequencer.effect_strip_add(type='CROSS')
> 
> bpy.ops.sequencer.duplicate(mode='TRANSLATION')
> bpy.ops.sequencer.paste()
> bpy.ops.sequencer.select()
> bpy.ops.sequencer.next_edit()
> 
> I would be very grateful to any suggestions that could help me solve
> this so I can be on my way in writing interesting scripts!
> 
> Sincerely, Ulf Enhörning
> 
> 
> PS. Here is a video I edited with Blender using the bpy.sequencer.ops.cut()
> operator:
> https://www.youtube.com/watch?v=4T5mBKBRRus

> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> https://lists.blender.org/mailman/listinfo/bf-python


-- 
Sybren A. Stüvel

https://stuvelfoto.nl/
https://stuvel.eu/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20160513/34177ae2/attachment.sig>


More information about the Bf-python mailing list