Falk David 99f3beb63f Refactor: VSE: Use new scene context function
This PR switches out the internal scene context function
used from the sequencer. This is done in preparation for
#140271.

Using a separate context function allows us to keep the
existing `context.scene` to refer to the active scene
and use a separate context member to refer to the
sequencer scene in the workspace (which is added in #140271).

Previous attempts simply overrode the `context.scene`
to refer to a different scene than the active one in the window.
This has two issues:
1) Any operator that wants to use the active scene in the window
  can't do it in the context of the sequencer. This is a problem for
  example for poll functions of operators that don't have anything to
  do with the sequencer.
2) For better or for worse, Blender expects the `context.scene` to
  always exist. For the sequencer, we'd like to possibly have no
  sequence selected.

Using a different context member for the sequencer has some
advantages:
1) Although we have to change quite a few places, it's limited to the
  sequencer. We don't have to change other parts of Blender to make
  things work.
2) It allows us to prepare for the future when we might want to
 separate the VSE from the scene. This is a step in that direction.
 Having a different context function makes it easy to find the places
 that would need to be refactored.

Pull Request: https://projects.blender.org/blender/blender/pulls/141271
2025-07-18 16:17:47 +02:00
2023-12-08 13:28:13 +11:00
2025-05-12 11:34:32 +02:00
2025-07-10 12:48:33 +10:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%