0
$\begingroup$

I'm trying to run this code headless to avoid the context error however I can't find any information about adding a color strip without using bpy.ops. How can I convert the following code to not use the operator please?

bpy.ops.sequencer.effect_strip_add(
    type='COLOR', 
    frame_start=1, 
    frame_end=int(file) * filesCount, 
    channel=1,
    color=(
        backgroundColor['r'] / 255, 
        backgroundColor['g'] / 255, 
        backgroundColor['b'] / 255
    )
)

I think it has something to do with new_effect however I can't see an option to add rgb values.

$\endgroup$
2
  • 1
    $\begingroup$ blender.stackexchange.com/a/101129/15543 $\endgroup$
    – batFINGER
    May 26, 2021 at 16:46
  • $\begingroup$ You beat me to it @batFINGER! Thanks so much! Your solution works perfectly. I really appreciate your help again :) $\endgroup$
    – Raja
    May 26, 2021 at 16:48

1 Answer 1

0
$\begingroup$

@batFINGER to the rescue! The answer to my question can be found here: https://blender.stackexchange.com/a/142392/111345 for anyone else that needs it.

$\endgroup$
3
  • $\begingroup$ If so, how about upvoting the answer? $\endgroup$
    – brockmann
    May 26, 2021 at 16:50
  • 1
    $\begingroup$ Just did, thanks for the heads up ;) $\endgroup$
    – Raja
    May 26, 2021 at 17:01
  • $\begingroup$ Already did upvote that one too! $\endgroup$
    – Raja
    May 26, 2021 at 21:26

You must log in to answer this question.

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