Page MenuHome

Feature: Python API create empty meta sequence for easier nested editing creation
ClosedPublic

Authored by Félix (Miadim) on Mar 9 2021, 11:44 AM.

Details

Summary

You can test it by doing in python console:

frame_start = 10
m = C.scene.sequence_editor.new_meta("test", 2, frame_start)
m.frame_start = frame_start
v = m.sequences.new_movie("mov", "path", 3, frame_start)
m.frame_final_duration = v.frame_duration

Diff Detail

Repository
rB Blender
Branch
ft_meta_api (branched from master)
Build Status
Buildable 13355
Build 13355: arc lint + arc unit

Event Timeline

Félix (Miadim) requested review of this revision.Mar 9 2021, 11:44 AM
Félix (Miadim) created this revision.
Félix (Miadim) edited the summary of this revision. (Show Details)Mar 9 2021, 11:52 AM
Félix (Miadim) edited the summary of this revision. (Show Details)
Félix (Miadim) edited the summary of this revision. (Show Details)

Any input about this patch?

Any input about this patch?

Yes going to look now

source/blender/sequencer/intern/strip_add.c
435

Please hard-code some non 0 length here as well.

This can length can be moved to SeqLoadData later. Or you can change SeqLoadData now so there is end_frame as for other strips (effect, image).

438–439

Because this function is called from python it should not alter selection state. It should only make strip and make sure it is good to use.

Richard Antalik (ISS) requested changes to this revision.Mar 17 2021, 1:03 PM
This revision now requires changes to proceed.Mar 17 2021, 1:03 PM
  • Changes: created seq activation removed. created meta len 1 by default
Félix (Miadim) marked 2 inline comments as done.Mar 17 2021, 7:09 PM

I think I did it as expected, tell me, it's my first patch :)

I overlooked one more issue - comment style see https://wiki.blender.org/wiki/Style_Guide/C_Cpp#Comments

Otherwise it seems to work fine. there seems to bug that prevents resizing meta properly, but I don't think that's caused by this patch, will look into that

source/blender/sequencer/intern/strip_add.c
426

@Richard Antalik (ISS) Shall we keep the Main *bmain even if we don't use it?

Félix (Miadim) marked an inline comment as not done.
  • Cleaning: Changed comments syntax
This revision is now accepted and ready to land.Mar 18 2021, 2:56 PM
source/blender/sequencer/intern/strip_add.c
426

Ah this I haven't noticed as well, no unused arguments would generate warning messages.

  • Cleaning: removed unused bmain an reports.
This revision was automatically updated to reflect the committed changes.