A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.
This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.
Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.
Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:
https://reuse.software/faq/
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
/* SPDX-FileCopyrightText: 2023 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
/** \file
|
|
* \ingroup bke
|
|
*/
|
|
|
|
#include "DNA_node_types.h"
|
|
|
|
#include "BLI_vector.hh"
|
|
|
|
namespace blender::bke::node_tree_zones {
|
|
|
|
struct TreeZone {
|
|
TreeZones *owner = nullptr;
|
|
/** Index of the zone in the array of all zones in a node tree. */
|
|
int index = -1;
|
|
/** Zero for top level zones, one for a nested zone, and so on. */
|
|
int depth = -1;
|
|
/** Input node of the zone. */
|
|
const bNode *input_node = nullptr;
|
|
/** Output node of the zone. */
|
|
const bNode *output_node = nullptr;
|
|
/** Direct parent of the zone. If this is null, this is a top level zone. */
|
|
TreeZone *parent_zone = nullptr;
|
|
/** Direct children zones. Does not contain recursively nested zones. */
|
|
Vector<TreeZone *> child_zones;
|
|
/** Direct children nodes. Does not contain recursively nested nodes. */
|
|
Vector<const bNode *> child_nodes;
|
|
|
|
bool contains_node_recursively(const bNode &node) const;
|
|
};
|
|
|
|
class TreeZones {
|
|
public:
|
|
Vector<std::unique_ptr<TreeZone>> zones;
|
|
Map<int, int> parent_zone_by_node_id;
|
|
};
|
|
|
|
const TreeZones *get_tree_zones(const bNodeTree &tree);
|
|
|
|
} // namespace blender::bke::node_tree_zones
|