Files
test/source/blender/sequencer/intern/strip_select.cc
John Kiril Swenson 2ab59859c9 Cleanup: VSE: Replace remaining seq and sequence references
Ref: #132179

Renames:
- `Editing.act_seq` -> `Editing.act_strip`
- `SequenceModifierData` -> `StripModifierData`
  - Its member `mask_sequence` is now `mask_strip`.
- `MetaStack.parseq` -> `MetaStack.parent_strip`
- Remaining function names/parameters that were not dealt with in #132748
- Various references to `seq` or `sequence` throughout code and docs when
  referring to a strip

Also moves `_get` to the end of the renamed function names where
applicable for standardization (unless "by" or "from" are used).

There should be no changes to current behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/138077
2025-05-01 00:22:04 +02:00

69 lines
1.3 KiB
C++

/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
* SPDX-FileCopyrightText: 2003-2009 Blender Authors
* SPDX-FileCopyrightText: 2005-2006 Peter Schlaile <peter [at] schlaile [dot] de>
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup bke
*/
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
#include "BLI_listbase.h"
#include "SEQ_select.hh"
#include "SEQ_sequencer.hh"
namespace blender::seq {
Strip *select_active_get(const Scene *scene)
{
const Editing *ed = editing_get(scene);
if (ed == nullptr) {
return nullptr;
}
return ed->act_strip;
}
void select_active_set(Scene *scene, Strip *strip)
{
Editing *ed = editing_get(scene);
if (ed == nullptr) {
return;
}
ed->act_strip = strip;
}
bool select_active_get_pair(Scene *scene, Strip **r_strip_act, Strip **r_strip_other)
{
Editing *ed = editing_get(scene);
*r_strip_act = select_active_get(scene);
if (*r_strip_act == nullptr) {
return false;
}
*r_strip_other = nullptr;
LISTBASE_FOREACH (Strip *, strip, ed->seqbasep) {
if (strip->flag & SELECT && (strip != (*r_strip_act))) {
if (*r_strip_other) {
return false;
}
*r_strip_other = strip;
}
}
return (*r_strip_other != nullptr);
}
} // namespace blender::seq