18 ListBaseT<StripConnection> *connections_src)
21 StripConnection *con_duplicate = MEM_new<StripConnection>(__func__, con);
31 if (con_other.strip_ref == strip) {
33 MEM_delete(&con_other);
38 MEM_delete(&con_strip);
43 if (strip ==
nullptr || strip->connections.is_empty()) {
56 for (
Strip *strip : strip_list) {
65 if (strip ==
nullptr) {
69 Strip *other = con_strip.strip_ref;
70 bool is_one_way =
true;
80 MEM_delete(&con_strip);
87 for (
Strip *strip : strip_list) {
89 if (!strip_list.
contains(con_strip.strip_ref)) {
98 if (strip1 ==
nullptr || strip2 ==
nullptr) {
102 strip_list.
add(strip1);
103 strip_list.
add(strip2);
110 strip_list.
remove_if([&](
Strip *strip) {
return strip ==
nullptr; });
112 for (
Strip *strip1 : strip_list) {
114 for (
Strip *strip2 : strip_list) {
115 if (strip1 == strip2) {
128 if (strip !=
nullptr) {
138 if (strip ==
nullptr) {
141 return !strip->connections.is_empty();
146 const int expected_connection_num = strip_list.
size() - 1;
147 for (
Strip *strip1 : strip_list) {
149 int found_connection_num = connections.
size();
150 if (found_connection_num != expected_connection_num) {
153 for (
Strip *strip2 : connections) {
bool contains(const Key &key) const
int64_t remove_if(Predicate &&predicate)
bool disconnect(Strip *strip)
bool are_strips_connected_together(VectorSet< Strip * > &strip_list)
void connections_duplicate(ListBaseT< StripConnection > *connections_dst, ListBaseT< StripConnection > *connections_src)
void connect(Strip *strip1, Strip *strip2)
void cut_one_way_connections(Strip *strip)
bool is_strip_connected(const Strip *strip)
static void connection_remove(Strip *strip, StripConnection &con_strip)
void cut_outside_connections(const VectorSet< Strip * > &strip_list)
VectorSet< Strip * > connected_strips_get(const Strip *strip)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)