diff --git a/source/blender/asset_system/intern/asset_library.cc b/source/blender/asset_system/intern/asset_library.cc index aa611820435..c0591dc233a 100644 --- a/source/blender/asset_system/intern/asset_library.cc +++ b/source/blender/asset_system/intern/asset_library.cc @@ -18,7 +18,9 @@ #include "BKE_preferences.h" #include "BLI_fileops.h" +#include "BLI_listbase.h" #include "BLI_path_util.h" +#include "BLI_string.h" #include "DNA_userdef_types.h" diff --git a/source/blender/asset_system/tests/asset_library_service_test.cc b/source/blender/asset_system/tests/asset_library_service_test.cc index 02188987646..a581038adb2 100644 --- a/source/blender/asset_system/tests/asset_library_service_test.cc +++ b/source/blender/asset_system/tests/asset_library_service_test.cc @@ -6,6 +6,7 @@ #include "BLI_fileops.h" /* For PATH_MAX (at least on Windows). */ #include "BLI_path_util.h" +#include "BLI_string.h" #include "BKE_appdir.h" #include "BKE_callbacks.h" diff --git a/source/blender/asset_system/tests/asset_representation_test.cc b/source/blender/asset_system/tests/asset_representation_test.cc index f062d5b4c19..810c8713602 100644 --- a/source/blender/asset_system/tests/asset_representation_test.cc +++ b/source/blender/asset_system/tests/asset_representation_test.cc @@ -2,6 +2,8 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_string.h" + #include "asset_library_service.hh" #include "asset_library_test_common.hh" diff --git a/source/blender/blenkernel/intern/armature_test.cc b/source/blender/blenkernel/intern/armature_test.cc index a78ff7d52b7..4eba11271f9 100644 --- a/source/blender/blenkernel/intern/armature_test.cc +++ b/source/blender/blenkernel/intern/armature_test.cc @@ -8,6 +8,7 @@ #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" #include "BLI_math_vector.h" +#include "BLI_string.h" #include "DNA_armature_types.h" diff --git a/source/blender/blenkernel/intern/asset_weak_reference.cc b/source/blender/blenkernel/intern/asset_weak_reference.cc index 0873f9f3995..26e2c0cab4d 100644 --- a/source/blender/blenkernel/intern/asset_weak_reference.cc +++ b/source/blender/blenkernel/intern/asset_weak_reference.cc @@ -8,6 +8,8 @@ #include +#include "BLI_string.h" + #include "AS_asset_identifier.hh" #include "AS_asset_library.hh" diff --git a/source/blender/blenkernel/intern/cryptomatte_test.cc b/source/blender/blenkernel/intern/cryptomatte_test.cc index cadbd76f06b..669b36dab3c 100644 --- a/source/blender/blenkernel/intern/cryptomatte_test.cc +++ b/source/blender/blenkernel/intern/cryptomatte_test.cc @@ -1,8 +1,11 @@ /* SPDX-FileCopyrightText: 2021 Blender Authors * * SPDX-License-Identifier: GPL-2.0-or-later */ + #include "testing/testing.h" +#include "BLI_string.h" + #include "BKE_cryptomatte.h" #include "BKE_cryptomatte.hh" #include "BKE_image.h" diff --git a/source/blender/blenkernel/intern/curve_legacy_convert.cc b/source/blender/blenkernel/intern/curve_legacy_convert.cc index 5c8aad7f613..27f69696d90 100644 --- a/source/blender/blenkernel/intern/curve_legacy_convert.cc +++ b/source/blender/blenkernel/intern/curve_legacy_convert.cc @@ -2,6 +2,7 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_listbase.h" #include "BLI_task.hh" #include "BLI_vector.hh" @@ -81,7 +82,10 @@ static KnotsMode knots_mode_from_legacy(const short flag) Curves *curve_legacy_to_curves(const Curve &curve_legacy, const ListBase &nurbs_list) { - const Vector src_curves(nurbs_list); + Vector src_curves; + LISTBASE_FOREACH (const Nurb *, item, &nurbs_list) { + src_curves.append(item); + } if (src_curves.is_empty()) { return nullptr; } diff --git a/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc b/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc index 05afd92c2cb..c8c4e81ac93 100644 --- a/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc +++ b/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc @@ -13,6 +13,7 @@ #include "BLI_color.hh" #include "BLI_listbase.h" #include "BLI_math_vector_types.hh" +#include "BLI_string.h" #include "BLI_vector.hh" #include "DNA_gpencil_legacy_types.h" diff --git a/source/blender/blenkernel/intern/grease_pencil_test.cc b/source/blender/blenkernel/intern/grease_pencil_test.cc index 9251f445356..c4ad980ab9b 100644 --- a/source/blender/blenkernel/intern/grease_pencil_test.cc +++ b/source/blender/blenkernel/intern/grease_pencil_test.cc @@ -4,6 +4,8 @@ #include "testing/testing.h" +#include "BLI_string.h" + #include "BKE_curves.hh" #include "BKE_grease_pencil.hh" #include "BKE_idtype.h" diff --git a/source/blender/blenkernel/intern/idprop_serialize_test.cc b/source/blender/blenkernel/intern/idprop_serialize_test.cc index d31d055daf1..f431cf56510 100644 --- a/source/blender/blenkernel/intern/idprop_serialize_test.cc +++ b/source/blender/blenkernel/intern/idprop_serialize_test.cc @@ -4,6 +4,8 @@ #include "testing/testing.h" +#include "BLI_listbase.h" + #include "DNA_ID.h" #include "BKE_idprop.hh" diff --git a/source/blender/blenkernel/intern/image_partial_update.cc b/source/blender/blenkernel/intern/image_partial_update.cc index 4f09590b1f4..35806b8fbf9 100644 --- a/source/blender/blenkernel/intern/image_partial_update.cc +++ b/source/blender/blenkernel/intern/image_partial_update.cc @@ -57,6 +57,7 @@ #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +#include "BLI_listbase.h" #include "BLI_vector.hh" namespace blender::bke::image::partial_update { diff --git a/source/blender/blenkernel/intern/main_namemap.cc b/source/blender/blenkernel/intern/main_namemap.cc index 57eb8049e70..828dab51c3c 100644 --- a/source/blender/blenkernel/intern/main_namemap.cc +++ b/source/blender/blenkernel/intern/main_namemap.cc @@ -18,6 +18,7 @@ #include "BLI_map.hh" #include "BLI_math_base.hh" #include "BLI_set.hh" +#include "BLI_string.h" #include "BLI_string_utf8.h" #include "BLI_string_utils.h" diff --git a/source/blender/blenkernel/intern/material.cc b/source/blender/blenkernel/intern/material.cc index b4217da9aa2..de7143976fe 100644 --- a/source/blender/blenkernel/intern/material.cc +++ b/source/blender/blenkernel/intern/material.cc @@ -41,6 +41,7 @@ #include "BLI_listbase.h" #include "BLI_math_color.h" #include "BLI_math_vector.h" +#include "BLI_string.h" #include "BLI_utildefines.h" #include "BLT_translation.h" diff --git a/source/blender/blenkernel/intern/mesh_boolean_convert.cc b/source/blender/blenkernel/intern/mesh_boolean_convert.cc index cb5a9c5bc15..49518c874ee 100644 --- a/source/blender/blenkernel/intern/mesh_boolean_convert.cc +++ b/source/blender/blenkernel/intern/mesh_boolean_convert.cc @@ -25,6 +25,7 @@ #include "BLI_mesh_boolean.hh" #include "BLI_mesh_intersect.hh" #include "BLI_span.hh" +#include "BLI_string.h" #include "BLI_task.hh" #include "BLI_virtual_array.hh" diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc index 47810570c22..120f9ba9f13 100644 --- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc +++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc @@ -23,6 +23,7 @@ #include "BLI_memarena.h" #include "BLI_polyfill_2d.h" #include "BLI_resource_scope.hh" +#include "BLI_string.h" #include "BLI_task.hh" #include "BLI_utildefines.h" diff --git a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc index d3c2ade9794..e5cd17468f4 100644 --- a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc +++ b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc @@ -452,12 +452,10 @@ void BKE_remesh_reproject_vertex_paint(Mesh *target, const Mesh *source) /* Make sure active/default color attribute (names) are brought over. */ if (source->active_color_attribute) { - MEM_SAFE_FREE(target->active_color_attribute); - target->active_color_attribute = BLI_strdup(source->active_color_attribute); + BKE_id_attributes_active_color_set(&target->id, source->active_color_attribute); } if (source->default_color_attribute) { - MEM_SAFE_FREE(target->default_color_attribute); - target->default_color_attribute = BLI_strdup(source->default_color_attribute); + BKE_id_attributes_default_color_set(&target->id, source->default_color_attribute); } free_bvhtree_from_mesh(&bvhtree); diff --git a/source/blender/blenkernel/intern/mesh_tangent.cc b/source/blender/blenkernel/intern/mesh_tangent.cc index 3195670d865..4863201c78d 100644 --- a/source/blender/blenkernel/intern/mesh_tangent.cc +++ b/source/blender/blenkernel/intern/mesh_tangent.cc @@ -17,6 +17,7 @@ #include "BLI_math_geom.h" #include "BLI_math_vector.h" +#include "BLI_string.h" #include "BLI_task.h" #include "BLI_utildefines.h" diff --git a/source/blender/blenkernel/intern/paint_canvas.cc b/source/blender/blenkernel/intern/paint_canvas.cc index 174a15f3e40..a980200a56e 100644 --- a/source/blender/blenkernel/intern/paint_canvas.cc +++ b/source/blender/blenkernel/intern/paint_canvas.cc @@ -1,7 +1,9 @@ /* SPDX-FileCopyrightText: 2023 Blender Authors * * SPDX-License-Identifier: GPL-2.0-or-later */ + #include "BLI_compiler_compat.h" +#include "BLI_string.h" #include "DNA_material_types.h" #include "DNA_mesh_types.h" diff --git a/source/blender/blenkernel/intern/pbvh_pixels.cc b/source/blender/blenkernel/intern/pbvh_pixels.cc index 8cae6927aae..a70e1e4b2da 100644 --- a/source/blender/blenkernel/intern/pbvh_pixels.cc +++ b/source/blender/blenkernel/intern/pbvh_pixels.cc @@ -14,9 +14,11 @@ #include "DNA_meshdata_types.h" #include "DNA_object_types.h" +#include "BLI_listbase.h" #include "BLI_math_geom.h" #include "BLI_math_vector.h" #include "BLI_task.h" + #include "PIL_time.h" #include "BKE_global.h" diff --git a/source/blender/blenkernel/intern/pbvh_pixels_copy.cc b/source/blender/blenkernel/intern/pbvh_pixels_copy.cc index a39eb3cbaf0..271a541e322 100644 --- a/source/blender/blenkernel/intern/pbvh_pixels_copy.cc +++ b/source/blender/blenkernel/intern/pbvh_pixels_copy.cc @@ -4,6 +4,7 @@ #include "BLI_array.hh" #include "BLI_bit_vector.hh" +#include "BLI_listbase.h" #include "BLI_math_geom.h" #include "BLI_math_vector.hh" #include "BLI_task.hh" diff --git a/source/blender/blenkernel/intern/simulation_state.cc b/source/blender/blenkernel/intern/simulation_state.cc index 36bc317a065..c5cea4bc8b2 100644 --- a/source/blender/blenkernel/intern/simulation_state.cc +++ b/source/blender/blenkernel/intern/simulation_state.cc @@ -17,6 +17,7 @@ #include "BLI_fileops.hh" #include "BLI_hash_md5.h" #include "BLI_path_util.h" +#include "BLI_string.h" #include "BLI_string_utils.h" #include "MOD_nodes.hh" diff --git a/source/blender/blenlib/BLI_hash.hh b/source/blender/blenlib/BLI_hash.hh index 714e8a965b8..f5ba7128ff2 100644 --- a/source/blender/blenlib/BLI_hash.hh +++ b/source/blender/blenlib/BLI_hash.hh @@ -66,7 +66,6 @@ #include #include -#include "BLI_math_base.h" #include "BLI_string_ref.hh" #include "BLI_utildefines.h" diff --git a/source/blender/blenlib/BLI_hash_tables.hh b/source/blender/blenlib/BLI_hash_tables.hh index b268f7f1315..f7b6386e331 100644 --- a/source/blender/blenlib/BLI_hash_tables.hh +++ b/source/blender/blenlib/BLI_hash_tables.hh @@ -14,11 +14,7 @@ #include #include "BLI_allocator.hh" -#include "BLI_array.hh" -#include "BLI_math_base.h" #include "BLI_memory_utils.hh" -#include "BLI_string.h" -#include "BLI_string_ref.hh" #include "BLI_utildefines.h" #include "BLI_vector.hh" @@ -303,7 +299,7 @@ class HashTableStats { removed_load_factor_ = (float)removed_amount_ / (float)capacity_; } - void print(StringRef name = "") const; + void print(const char *name) const; }; /** \} */ diff --git a/source/blender/blenlib/BLI_map.hh b/source/blender/blenlib/BLI_map.hh index 0066bbf8ee5..6f56c56faf4 100644 --- a/source/blender/blenlib/BLI_map.hh +++ b/source/blender/blenlib/BLI_map.hh @@ -915,7 +915,7 @@ class Map { /** * Print common statistics like size and collision count. This is useful for debugging purposes. */ - void print_stats(StringRef name = "") const + void print_stats(const char *name) const { HashTableStats stats(*this, this->keys()); stats.print(name); diff --git a/source/blender/blenlib/BLI_set.hh b/source/blender/blenlib/BLI_set.hh index e769ec6889f..519789b55fd 100644 --- a/source/blender/blenlib/BLI_set.hh +++ b/source/blender/blenlib/BLI_set.hh @@ -511,7 +511,7 @@ class Set { /** * Print common statistics like size and collision count. This is useful for debugging purposes. */ - void print_stats(StringRef name = "") const + void print_stats(const char *name) const { HashTableStats stats(*this, *this); stats.print(name); diff --git a/source/blender/blenlib/BLI_vector.hh b/source/blender/blenlib/BLI_vector.hh index c1553afe712..01f454f8a38 100644 --- a/source/blender/blenlib/BLI_vector.hh +++ b/source/blender/blenlib/BLI_vector.hh @@ -31,11 +31,8 @@ #include "BLI_allocator.hh" #include "BLI_index_range.hh" -#include "BLI_listbase_wrapper.hh" -#include "BLI_math_base.h" #include "BLI_memory_utils.hh" #include "BLI_span.hh" -#include "BLI_string_ref.hh" #include "BLI_utildefines.h" #include "MEM_guardedalloc.h" @@ -43,7 +40,7 @@ namespace blender { namespace internal { -void vector_print_stats(StringRef name, +void vector_print_stats(const char *name, void *address, int64_t size, int64_t capacity, @@ -211,21 +208,6 @@ class Vector { } } - /** - * Create a vector from a ListBase. The caller has to make sure that the values in the linked - * list have the correct type. - * - * Example Usage: - * Vector modifiers(ob->modifiers); - */ - Vector(const ListBase &values, Allocator allocator = {}) - : Vector(NoExceptConstructor(), allocator) - { - LISTBASE_FOREACH (T, value, &values) { - this->append(value); - } - } - /** * Create a copy of another vector. The other vector will not be changed. If the other vector has * less than InlineBufferCapacity elements, no allocation will be made. @@ -983,7 +965,7 @@ class Vector { /** * Print some debug information about the vector. */ - void print_stats(StringRef name = "") const + void print_stats(const char *name) const { internal::vector_print_stats( name, this, this->size(), capacity_end_ - begin_, InlineBufferCapacity, sizeof(*this)); diff --git a/source/blender/blenlib/BLI_vector_set.hh b/source/blender/blenlib/BLI_vector_set.hh index c94848428cf..801af64687d 100644 --- a/source/blender/blenlib/BLI_vector_set.hh +++ b/source/blender/blenlib/BLI_vector_set.hh @@ -482,7 +482,7 @@ class VectorSet { /** * Print common statistics like size and collision count. This is useful for debugging purposes. */ - void print_stats(StringRef name = "") const + void print_stats(const char *name) const { HashTableStats stats(*this, this->as_span()); stats.print(name); diff --git a/source/blender/blenlib/intern/hash_tables.cc b/source/blender/blenlib/intern/hash_tables.cc index 44c8ef48370..f0c36eab60e 100644 --- a/source/blender/blenlib/intern/hash_tables.cc +++ b/source/blender/blenlib/intern/hash_tables.cc @@ -7,7 +7,7 @@ #include -void blender::HashTableStats::print(StringRef name) const +void blender::HashTableStats::print(const char *name) const { std::cout << "Hash Table Stats: " << name << "\n"; std::cout << " Address: " << address_ << "\n"; diff --git a/source/blender/blenlib/intern/mesh_boolean.cc b/source/blender/blenlib/intern/mesh_boolean.cc index 0a662a31465..c0f1b2b7f07 100644 --- a/source/blender/blenlib/intern/mesh_boolean.cc +++ b/source/blender/blenlib/intern/mesh_boolean.cc @@ -206,7 +206,7 @@ TriMeshTopology::TriMeshTopology(const IMesh &tm) std::cout << "tris for edge " << item.key << ": " << *item.value << "\n"; constexpr bool print_stats = false; if (print_stats) { - edge_tri_.print_stats(); + edge_tri_.print_stats(""); } } for (auto item : vert_edges_.items()) { diff --git a/source/blender/blenlib/intern/vector.cc b/source/blender/blenlib/intern/vector.cc index 22d6e1c87c3..b3f594721cb 100644 --- a/source/blender/blenlib/intern/vector.cc +++ b/source/blender/blenlib/intern/vector.cc @@ -7,7 +7,7 @@ #include -void blender::internal::vector_print_stats(StringRef name, +void blender::internal::vector_print_stats(const char *name, void *address, int64_t size, int64_t capacity, diff --git a/source/blender/blenlib/tests/BLI_vector_test.cc b/source/blender/blenlib/tests/BLI_vector_test.cc index 8179dcb435a..aca21af4d25 100644 --- a/source/blender/blenlib/tests/BLI_vector_test.cc +++ b/source/blender/blenlib/tests/BLI_vector_test.cc @@ -79,27 +79,27 @@ struct TestListValue { int value; }; -TEST(vector, ListBaseConstructor) -{ - TestListValue *value1 = new TestListValue{nullptr, nullptr, 4}; - TestListValue *value2 = new TestListValue{nullptr, nullptr, 5}; - TestListValue *value3 = new TestListValue{nullptr, nullptr, 6}; +// TEST(vector, ListBaseConstructor) +// { +// TestListValue *value1 = new TestListValue{nullptr, nullptr, 4}; +// TestListValue *value2 = new TestListValue{nullptr, nullptr, 5}; +// TestListValue *value3 = new TestListValue{nullptr, nullptr, 6}; - ListBase list = {nullptr, nullptr}; - BLI_addtail(&list, value1); - BLI_addtail(&list, value2); - BLI_addtail(&list, value3); - Vector vec(list); +// ListBase list = {nullptr, nullptr}; +// BLI_addtail(&list, value1); +// BLI_addtail(&list, value2); +// BLI_addtail(&list, value3); +// Vector vec(list); - EXPECT_EQ(vec.size(), 3); - EXPECT_EQ(vec[0]->value, 4); - EXPECT_EQ(vec[1]->value, 5); - EXPECT_EQ(vec[2]->value, 6); +// EXPECT_EQ(vec.size(), 3); +// EXPECT_EQ(vec[0]->value, 4); +// EXPECT_EQ(vec[1]->value, 5); +// EXPECT_EQ(vec[2]->value, 6); - delete value1; - delete value2; - delete value3; -} +// delete value1; +// delete value2; +// delete value3; +// } TEST(vector, IteratorConstructor) { diff --git a/source/blender/blenloader/intern/versioning_400.cc b/source/blender/blenloader/intern/versioning_400.cc index 3efe97e3103..191927da38d 100644 --- a/source/blender/blenloader/intern/versioning_400.cc +++ b/source/blender/blenloader/intern/versioning_400.cc @@ -30,6 +30,7 @@ #include "BLI_map.hh" #include "BLI_math_vector.h" #include "BLI_set.hh" +#include "BLI_string.h" #include "BLI_string_ref.hh" #include "BKE_armature.h" diff --git a/source/blender/bmesh/intern/bmesh_construct.cc b/source/blender/bmesh/intern/bmesh_construct.cc index 17d5d9c0b3d..683d690083c 100644 --- a/source/blender/bmesh/intern/bmesh_construct.cc +++ b/source/blender/bmesh/intern/bmesh_construct.cc @@ -11,6 +11,7 @@ #include "MEM_guardedalloc.h" #include "BLI_alloca.h" +#include "BLI_listbase.h" #include "BLI_math_vector.h" #include "BLI_sort_utils.h" diff --git a/source/blender/bmesh/operators/bmo_triangulate.cc b/source/blender/bmesh/operators/bmo_triangulate.cc index b41bfb1bb75..4438964559a 100644 --- a/source/blender/bmesh/operators/bmo_triangulate.cc +++ b/source/blender/bmesh/operators/bmo_triangulate.cc @@ -12,6 +12,7 @@ #include "DNA_listBase.h" +#include "BLI_listbase.h" #include "BLI_math_vector.h" #include "BLI_scanfill.h" #include "BLI_sort_utils.h" diff --git a/source/blender/bmesh/tools/bmesh_edgesplit.cc b/source/blender/bmesh/tools/bmesh_edgesplit.cc index 23005c08081..08526b1040f 100644 --- a/source/blender/bmesh/tools/bmesh_edgesplit.cc +++ b/source/blender/bmesh/tools/bmesh_edgesplit.cc @@ -10,6 +10,7 @@ #include "MEM_guardedalloc.h" +#include "BLI_listbase.h" #include "BLI_utildefines.h" #include "bmesh.h" diff --git a/source/blender/compositor/intern/COM_Debug.cc b/source/blender/compositor/intern/COM_Debug.cc index bc6dd1d79cc..5e566007554 100644 --- a/source/blender/compositor/intern/COM_Debug.cc +++ b/source/blender/compositor/intern/COM_Debug.cc @@ -4,14 +4,13 @@ #include "COM_Debug.h" -extern "C" { #include "BLI_fileops.h" #include "BLI_path_util.h" +#include "BLI_string.h" #include "BKE_appdir.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -} #include "COM_ExecutionGroup.h" #include "COM_ReadBufferOperation.h" diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cc b/source/blender/compositor/intern/COM_ExecutionGroup.cc index cb9f58d0719..955d6f25abb 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cc +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cc @@ -12,6 +12,7 @@ #include "COM_defines.h" #include "BLI_rand.hh" +#include "BLI_string.h" #include "BLT_translation.h" diff --git a/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc b/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc index 88497e2d15f..c254006bf1f 100644 --- a/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc +++ b/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc @@ -4,6 +4,8 @@ #include "COM_FullFrameExecutionModel.h" +#include "BLI_string.h" + #include "BLT_translation.h" #include "COM_Debug.h" diff --git a/source/blender/compositor/nodes/COM_CryptomatteNode.cc b/source/blender/compositor/nodes/COM_CryptomatteNode.cc index aeb36ef35a7..d3283bfdd8b 100644 --- a/source/blender/compositor/nodes/COM_CryptomatteNode.cc +++ b/source/blender/compositor/nodes/COM_CryptomatteNode.cc @@ -2,6 +2,8 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_string.h" + #include "BKE_node.hh" #include "NOD_composite.h" diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cc b/source/blender/compositor/nodes/COM_OutputFileNode.cc index b6ee3af8b78..e2d82ca7d60 100644 --- a/source/blender/compositor/nodes/COM_OutputFileNode.cc +++ b/source/blender/compositor/nodes/COM_OutputFileNode.cc @@ -4,6 +4,8 @@ #include "COM_OutputFileNode.h" +#include "BLI_string.h" + namespace blender::compositor { OutputFileNode::OutputFileNode(bNode *editor_node) : Node(editor_node) diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cc b/source/blender/compositor/operations/COM_CompositorOperation.cc index eba7a134d62..114f8c3cf33 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cc +++ b/source/blender/compositor/operations/COM_CompositorOperation.cc @@ -4,6 +4,8 @@ #include "COM_CompositorOperation.h" +#include "BLI_string.h" + #include "BKE_global.h" #include "BKE_image.h" #include "BKE_scene.h" @@ -176,6 +178,11 @@ void CompositorOperation::execute_region(rcti *rect, uint /*tile_number*/) } } +void CompositorOperation::set_scene_name(const char *scene_name) +{ + BLI_strncpy(scene_name_, scene_name, sizeof(scene_name_)); +} + void CompositorOperation::update_memory_buffer_partial(MemoryBuffer * /*output*/, const rcti &area, Span inputs) diff --git a/source/blender/compositor/operations/COM_CompositorOperation.h b/source/blender/compositor/operations/COM_CompositorOperation.h index 084dda5f400..f0115c84852 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.h +++ b/source/blender/compositor/operations/COM_CompositorOperation.h @@ -67,10 +67,7 @@ class CompositorOperation : public MultiThreadedOperation { { scene_ = scene; } - void set_scene_name(const char *scene_name) - { - BLI_strncpy(scene_name_, scene_name, sizeof(scene_name_)); - } + void set_scene_name(const char *scene_name); void set_view_name(const char *view_name) { view_name_ = view_name; diff --git a/source/blender/compositor/operations/COM_ConvertColorSpaceOperation.cc b/source/blender/compositor/operations/COM_ConvertColorSpaceOperation.cc index 4d1c6adba40..f06bca284e3 100644 --- a/source/blender/compositor/operations/COM_ConvertColorSpaceOperation.cc +++ b/source/blender/compositor/operations/COM_ConvertColorSpaceOperation.cc @@ -4,6 +4,8 @@ #include "COM_ConvertColorSpaceOperation.h" +#include "BLI_string.h" + namespace blender::compositor { ConvertColorSpaceOperation::ConvertColorSpaceOperation() diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cc b/source/blender/compositor/operations/COM_MultilayerImageOperation.cc index 7cc67c4121c..0a068e6abd8 100644 --- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cc +++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cc @@ -4,6 +4,8 @@ #include "COM_MultilayerImageOperation.h" +#include "BLI_string.h" + #include "IMB_imbuf.h" namespace blender::compositor { diff --git a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cc b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cc index 3d3efc80783..9705e1c8450 100644 --- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cc +++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cc @@ -5,6 +5,7 @@ #include "COM_OutputFileMultiViewOperation.h" #include "BLI_fileops.h" +#include "BLI_string.h" #include "BKE_image.h" #include "BKE_image_format.h" diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cc b/source/blender/compositor/operations/COM_RenderLayersProg.cc index e658961d52c..f8027faf1d5 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cc +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cc @@ -4,6 +4,8 @@ #include "COM_RenderLayersProg.h" +#include "BLI_string.h" + #include "BKE_image.h" namespace blender::compositor { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc index e02b6585632..5111861f584 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc @@ -12,6 +12,8 @@ #include +#include "BLI_listbase.h" + #include "DNA_anim_types.h" #include "BKE_anim_data.h" diff --git a/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc b/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc index fc37621a78a..4407cb6449d 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_visibility.cc @@ -13,6 +13,7 @@ #include "DNA_object_types.h" #include "BLI_assert.h" +#include "BLI_listbase.h" #include "BLI_stack.h" #include "DEG_depsgraph.h" diff --git a/source/blender/draw/intern/draw_attributes.cc b/source/blender/draw/intern/draw_attributes.cc index 8949d45f608..bfc67c82e3c 100644 --- a/source/blender/draw/intern/draw_attributes.cc +++ b/source/blender/draw/intern/draw_attributes.cc @@ -2,6 +2,8 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_string.h" + #include "draw_attributes.hh" /* Return true if the given DRW_AttributeRequest is already in the requests. */ diff --git a/source/blender/draw/intern/draw_cache_impl_pointcloud.cc b/source/blender/draw/intern/draw_cache_impl_pointcloud.cc index 77148549b6b..fc60310a633 100644 --- a/source/blender/draw/intern/draw_cache_impl_pointcloud.cc +++ b/source/blender/draw/intern/draw_cache_impl_pointcloud.cc @@ -12,6 +12,7 @@ #include "MEM_guardedalloc.h" +#include "BLI_listbase.h" #include "BLI_math_base.h" #include "BLI_math_color.hh" #include "BLI_math_vector.h" diff --git a/source/blender/draw/intern/draw_pbvh.cc b/source/blender/draw/intern/draw_pbvh.cc index dd6dc8bce34..24b9e230423 100644 --- a/source/blender/draw/intern/draw_pbvh.cc +++ b/source/blender/draw/intern/draw_pbvh.cc @@ -26,6 +26,7 @@ #include "BLI_map.hh" #include "BLI_math_color.h" #include "BLI_math_vector_types.hh" +#include "BLI_string.h" #include "BLI_string_ref.hh" #include "BLI_timeit.hh" #include "BLI_utildefines.h" diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc index 1c8eaaa8c30..7e2fbea7782 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_uv.cc @@ -8,6 +8,7 @@ #include "BLI_array_utils.hh" #include "BLI_math_vector_types.hh" +#include "BLI_string.h" #include "draw_subdivision.h" #include "extract_mesh.hh" diff --git a/source/blender/editors/asset/intern/asset_indexer.cc b/source/blender/editors/asset/intern/asset_indexer.cc index 69abdc47d11..17775a5a540 100644 --- a/source/blender/editors/asset/intern/asset_indexer.cc +++ b/source/blender/editors/asset/intern/asset_indexer.cc @@ -22,6 +22,7 @@ #include "BLI_path_util.h" #include "BLI_serialize.hh" #include "BLI_set.hh" +#include "BLI_string.h" #include "BLI_string_ref.hh" #include "BLI_uuid.h" diff --git a/source/blender/editors/asset/intern/asset_list.cc b/source/blender/editors/asset/intern/asset_list.cc index 5e08fbe3829..91997a9b029 100644 --- a/source/blender/editors/asset/intern/asset_list.cc +++ b/source/blender/editors/asset/intern/asset_list.cc @@ -21,6 +21,7 @@ #include "BKE_screen.h" #include "BLI_map.hh" +#include "BLI_string.h" #include "BLI_utility_mixins.hh" #include "DNA_space_types.h" diff --git a/source/blender/editors/asset/intern/asset_shelf_asset_view.cc b/source/blender/editors/asset/intern/asset_shelf_asset_view.cc index 14d77201caf..f70d2928107 100644 --- a/source/blender/editors/asset/intern/asset_shelf_asset_view.cc +++ b/source/blender/editors/asset/intern/asset_shelf_asset_view.cc @@ -14,6 +14,7 @@ #include "BKE_screen.h" #include "BLI_fnmatch.h" +#include "BLI_string.h" #include "DNA_asset_types.h" #include "DNA_screen_types.h" diff --git a/source/blender/editors/asset/intern/asset_shelf_catalog_selector.cc b/source/blender/editors/asset/intern/asset_shelf_catalog_selector.cc index 00de6ce0c37..c310ffdba0e 100644 --- a/source/blender/editors/asset/intern/asset_shelf_catalog_selector.cc +++ b/source/blender/editors/asset/intern/asset_shelf_catalog_selector.cc @@ -12,6 +12,8 @@ #include "AS_asset_catalog_tree.hh" #include "AS_asset_library.hh" +#include "BLI_string.h" + #include "DNA_screen_types.h" #include "BKE_context.h" diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc index da42769583e..2c330651d36 100644 --- a/source/blender/editors/curves/intern/curves_ops.cc +++ b/source/blender/editors/curves/intern/curves_ops.cc @@ -14,6 +14,7 @@ #include "BLI_math_geom.h" #include "BLI_math_matrix.hh" #include "BLI_rand.hh" +#include "BLI_string.h" #include "BLI_utildefines.h" #include "BLI_vector_set.hh" diff --git a/source/blender/editors/geometry/node_group_operator.cc b/source/blender/editors/geometry/node_group_operator.cc index fd21012b061..048e7873542 100644 --- a/source/blender/editors/geometry/node_group_operator.cc +++ b/source/blender/editors/geometry/node_group_operator.cc @@ -6,6 +6,8 @@ * \ingroup edcurves */ +#include "BLI_string.h" + #include "ED_curves.hh" #include "ED_object.hh" #include "ED_screen.hh" diff --git a/source/blender/editors/include/UI_interface_icons.hh b/source/blender/editors/include/UI_interface_icons.hh index 93630f2b595..8e7b10e45ee 100644 --- a/source/blender/editors/include/UI_interface_icons.hh +++ b/source/blender/editors/include/UI_interface_icons.hh @@ -16,6 +16,7 @@ struct Collection; struct ID; struct ImBuf; +struct ListBase; struct PointerRNA; struct PreviewImage; struct Scene; diff --git a/source/blender/editors/mesh/editmesh_undo.cc b/source/blender/editors/mesh/editmesh_undo.cc index ed5485de669..7dcb3be9121 100644 --- a/source/blender/editors/mesh/editmesh_undo.cc +++ b/source/blender/editors/mesh/editmesh_undo.cc @@ -20,6 +20,7 @@ #include "BLI_array_utils.h" #include "BLI_implicit_sharing.hh" #include "BLI_listbase.h" +#include "BLI_string.h" #include "BLI_task.hh" #include "BKE_context.h" diff --git a/source/blender/editors/object/object_bake_simulation.cc b/source/blender/editors/object/object_bake_simulation.cc index 3fc3bb61f3e..8f0e2bd6736 100644 --- a/source/blender/editors/object/object_bake_simulation.cc +++ b/source/blender/editors/object/object_bake_simulation.cc @@ -11,6 +11,7 @@ #include "BLI_fileops.hh" #include "BLI_path_util.h" #include "BLI_serialize.hh" +#include "BLI_string.h" #include "BLI_string_utils.h" #include "BLI_vector.hh" diff --git a/source/blender/editors/render/render_internal.cc b/source/blender/editors/render/render_internal.cc index a20a049884d..f833ba1dbbc 100644 --- a/source/blender/editors/render/render_internal.cc +++ b/source/blender/editors/render/render_internal.cc @@ -14,6 +14,7 @@ #include "BLI_listbase.h" #include "BLI_rect.h" +#include "BLI_string.h" #include "BLI_string_utils.h" #include "BLI_threads.h" #include "BLI_timecode.h" diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc index 3bb3aca59a5..e4bdf57a200 100644 --- a/source/blender/editors/render/render_shading.cc +++ b/source/blender/editors/render/render_shading.cc @@ -26,6 +26,7 @@ #include "BLI_listbase.h" #include "BLI_math_vector.h" #include "BLI_path_util.h" +#include "BLI_string.h" #include "BLI_string_utils.h" #include "BLI_utildefines.h" diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc index 436401f5249..d07ca9046c8 100644 --- a/source/blender/editors/sculpt_paint/paint_image.cc +++ b/source/blender/editors/sculpt_paint/paint_image.cc @@ -15,6 +15,7 @@ #include "MEM_guardedalloc.h" #include "BLI_math_vector.hh" +#include "BLI_string.h" #include "BLI_utildefines.h" #include "BLT_translation.h" diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.cc b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.cc index 127358fe687..b86f0e9b916 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.cc +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.cc @@ -15,6 +15,7 @@ #include "BLI_math_matrix.h" #include "BLI_math_vector.h" #include "BLI_math_vector_types.hh" +#include "BLI_string.h" #include "BLI_task.h" #include "BLT_translation.h" diff --git a/source/blender/editors/space_node/add_menu_assets.cc b/source/blender/editors/space_node/add_menu_assets.cc index 32ce05d21bd..4cfe6d950d0 100644 --- a/source/blender/editors/space_node/add_menu_assets.cc +++ b/source/blender/editors/space_node/add_menu_assets.cc @@ -8,6 +8,7 @@ #include "AS_asset_representation.hh" #include "BLI_multi_value_map.hh" +#include "BLI_string.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" diff --git a/source/blender/editors/space_node/add_node_search.cc b/source/blender/editors/space_node/add_node_search.cc index 4b50da13f2a..b779a743ac0 100644 --- a/source/blender/editors/space_node/add_node_search.cc +++ b/source/blender/editors/space_node/add_node_search.cc @@ -9,6 +9,7 @@ #include "AS_asset_representation.hh" #include "BLI_listbase.h" +#include "BLI_string.h" #include "BLI_string_search.hh" #include "DNA_space_types.h" diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index 92440f6b167..1a05f9f07e4 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -8,6 +8,7 @@ */ #include "BLI_color.hh" +#include "BLI_string.h" #include "BLI_system.h" #include "BLI_threads.h" diff --git a/source/blender/editors/space_node/node_context_path.cc b/source/blender/editors/space_node/node_context_path.cc index dbebb375e66..5fec0b5e3cd 100644 --- a/source/blender/editors/space_node/node_context_path.cc +++ b/source/blender/editors/space_node/node_context_path.cc @@ -55,9 +55,10 @@ static void context_path_add_node_tree_and_node_groups(const SpaceNode &snode, Vector &path, const bool skip_base = false) { - Vector tree_path = snode.treepath; - for (const bNodeTreePath *path_item : tree_path.as_span().drop_front(int(skip_base))) { - ui::context_path_add_generic(path, RNA_NodeTree, path_item->nodetree, ICON_NODETREE); + LISTBASE_FOREACH (const bNodeTreePath *, path_item, &snode.treepath) { + if (skip_base && path_item == snode.treepath.first) { + ui::context_path_add_generic(path, RNA_NodeTree, path_item->nodetree, ICON_NODETREE); + } } } diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 8efa2dc255d..159afff434b 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -28,6 +28,7 @@ #include "BLI_map.hh" #include "BLI_set.hh" #include "BLI_span.hh" +#include "BLI_string.h" #include "BLI_string_ref.hh" #include "BLI_vector.hh" diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc index 67d2967b280..661369d284d 100644 --- a/source/blender/editors/space_node/node_edit.cc +++ b/source/blender/editors/space_node/node_edit.cc @@ -32,6 +32,7 @@ #include "BKE_workspace.h" #include "BLI_set.hh" +#include "BLI_string.h" #include "BLI_string_utf8.h" #include "BLT_translation.h" diff --git a/source/blender/editors/space_node/node_geometry_attribute_search.cc b/source/blender/editors/space_node/node_geometry_attribute_search.cc index fa05447d6d7..5121a79f124 100644 --- a/source/blender/editors/space_node/node_geometry_attribute_search.cc +++ b/source/blender/editors/space_node/node_geometry_attribute_search.cc @@ -7,6 +7,7 @@ #include "BLI_map.hh" #include "BLI_rect.h" #include "BLI_set.hh" +#include "BLI_string.h" #include "BLI_string_ref.hh" #include "BLI_string_search.hh" diff --git a/source/blender/editors/space_node/node_shader_preview.cc b/source/blender/editors/space_node/node_shader_preview.cc index 2edd51c2341..4eb5ad3ec7e 100644 --- a/source/blender/editors/space_node/node_shader_preview.cc +++ b/source/blender/editors/space_node/node_shader_preview.cc @@ -22,6 +22,8 @@ * the wanted viewlayer/pass for each previewed node. */ +#include "BLI_string.h" + #include "DNA_camera_types.h" #include "DNA_material_types.h" #include "DNA_world_types.h" @@ -101,7 +103,11 @@ static void ensure_nodetree_previews(const bContext &C, static std::optional get_compute_context_hash_for_node_editor( const SpaceNode &snode) { - Vector treepath = snode.treepath; + Vector treepath; + LISTBASE_FOREACH (const bNodeTreePath *, item, &snode.treepath) { + treepath.append(item); + } + if (treepath.is_empty()) { return std::nullopt; } diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc index 8ac65616dd6..419f74353ca 100644 --- a/source/blender/editors/space_node/space_node.cc +++ b/source/blender/editors/space_node/space_node.cc @@ -6,6 +6,8 @@ * \ingroup spnode */ +#include "BLI_string.h" + #include "DNA_ID.h" #include "DNA_gpencil_legacy_types.h" #include "DNA_light_types.h" diff --git a/source/blender/editors/space_outliner/tree/tree_element_defgroup.cc b/source/blender/editors/space_outliner/tree/tree_element_defgroup.cc index a98b30f1e90..37427008eef 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_defgroup.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_defgroup.cc @@ -6,6 +6,8 @@ * \ingroup spoutliner */ +#include "BLI_listbase.h" + #include "DNA_object_types.h" #include "DNA_outliner_types.h" diff --git a/source/blender/editors/space_outliner/tree/tree_element_grease_pencil_node.cc b/source/blender/editors/space_outliner/tree/tree_element_grease_pencil_node.cc index 444004a87f1..c2c4e59b32a 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_grease_pencil_node.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_grease_pencil_node.cc @@ -6,6 +6,8 @@ * \ingroup spoutliner */ +#include "BLI_listbase.h" + #include "BKE_grease_pencil.hh" #include "DNA_outliner_types.h" diff --git a/source/blender/editors/space_outliner/tree/tree_element_id_grease_pencil.cc b/source/blender/editors/space_outliner/tree/tree_element_id_grease_pencil.cc index 512c28ea904..46482c430ae 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_id_grease_pencil.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_id_grease_pencil.cc @@ -6,6 +6,8 @@ * \ingroup spoutliner */ +#include "BLI_listbase.h" + #include "BKE_grease_pencil.hh" #include "DNA_outliner_types.h" diff --git a/source/blender/editors/space_outliner/tree/tree_element_id_object.cc b/source/blender/editors/space_outliner/tree/tree_element_id_object.cc index 49a5b2e63c9..6ee90335734 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_id_object.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_id_object.cc @@ -6,12 +6,13 @@ * \ingroup spoutliner */ +#include "BLI_listbase.h" + #include "DNA_ID.h" #include "DNA_action_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" #include "DNA_gpencil_modifier_types.h" -#include "DNA_listBase.h" #include "DNA_modifier_types.h" #include "DNA_object_types.h" #include "DNA_outliner_types.h" diff --git a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc index 42ebcd5edef..b806025a9ce 100644 --- a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc +++ b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc @@ -5,6 +5,7 @@ #include #include "BLI_listbase.h" +#include "BLI_string.h" #include "BKE_global.h" #include "BKE_lib_remap.h" diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_dataset_draw.cc b/source/blender/editors/space_spreadsheet/spreadsheet_dataset_draw.cc index 8c9885b36ae..6ec10078421 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_dataset_draw.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_dataset_draw.cc @@ -2,6 +2,8 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_string.h" + #include "DNA_space_types.h" #include "DNA_windowmanager_types.h" diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc index 4dc0a268a9d..995376684db 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc @@ -8,6 +8,7 @@ #include "BLI_math_color.hh" #include "BLI_math_quaternion_types.hh" #include "BLI_math_vector_types.hh" +#include "BLI_string.h" #include "BKE_geometry_set.hh" #include "BKE_instances.hh" diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_panels.cc b/source/blender/editors/space_spreadsheet/spreadsheet_panels.cc index 3ee99738375..15a5eb480b4 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_panels.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_panels.cc @@ -2,6 +2,9 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_listbase.h" +#include "BLI_string.h" + #include "BKE_screen.h" #include "BLT_translation.h" diff --git a/source/blender/editors/util/ed_viewer_path.cc b/source/blender/editors/util/ed_viewer_path.cc index e8d76683392..a80248f0f91 100644 --- a/source/blender/editors/util/ed_viewer_path.cc +++ b/source/blender/editors/util/ed_viewer_path.cc @@ -12,6 +12,7 @@ #include "BKE_workspace.h" #include "BLI_listbase.h" +#include "BLI_string.h" #include "BLI_vector.hh" #include "DNA_modifier_types.h" @@ -85,7 +86,11 @@ static void viewer_path_for_geometry_node(const SpaceNode &snode, modifier_elem->modifier_name = BLI_strdup(modifier->modifier.name); BLI_addtail(&r_dst.path, modifier_elem); - Vector tree_path = snode.treepath; + Vector tree_path; + LISTBASE_FOREACH (const bNodeTreePath *, item, &snode.treepath) { + tree_path.append(item); + } + for (const int i : tree_path.index_range().drop_back(1)) { bNodeTree *tree = tree_path[i]->nodetree; /* The tree path contains the name of the node but not its ID. */ @@ -207,7 +212,11 @@ Object *parse_object_only(const ViewerPath &viewer_path) std::optional parse_geometry_nodes_viewer( const ViewerPath &viewer_path) { - const Vector elems_vec = viewer_path.path; + Vector elems_vec; + LISTBASE_FOREACH (const ViewerPathElem *, item, &viewer_path.path) { + elems_vec.append(item); + } + if (elems_vec.size() < 3) { /* Need at least the object, modifier and viewer node name. */ return std::nullopt; diff --git a/source/blender/editors/uvedit/uvedit_islands.cc b/source/blender/editors/uvedit/uvedit_islands.cc index 904bcffeb42..bf1893c2655 100644 --- a/source/blender/editors/uvedit/uvedit_islands.cc +++ b/source/blender/editors/uvedit/uvedit_islands.cc @@ -13,6 +13,7 @@ * This API uses #BMesh data structures and doesn't have limitations for manifold meshes. */ +#include "BLI_listbase.h" #include "BLI_math_vector.h" #include "BKE_editmesh.h" diff --git a/source/blender/geometry/intern/mesh_copy_selection.cc b/source/blender/geometry/intern/mesh_copy_selection.cc index 0db81d5fe4a..98344e28f67 100644 --- a/source/blender/geometry/intern/mesh_copy_selection.cc +++ b/source/blender/geometry/intern/mesh_copy_selection.cc @@ -6,6 +6,7 @@ #include "BLI_enumerable_thread_specific.hh" #include "BLI_index_mask.hh" +#include "BLI_listbase.h" #include "BKE_attribute.hh" #include "BKE_geometry_fields.hh" diff --git a/source/blender/geometry/intern/realize_instances.cc b/source/blender/geometry/intern/realize_instances.cc index ea16a556dd9..dc353a50c1b 100644 --- a/source/blender/geometry/intern/realize_instances.cc +++ b/source/blender/geometry/intern/realize_instances.cc @@ -11,6 +11,7 @@ #include "DNA_object_types.h" #include "DNA_pointcloud_types.h" +#include "BLI_listbase.h" #include "BLI_math_matrix.hh" #include "BLI_noise.hh" #include "BLI_task.hh" diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc index b75a10393ba..930c3a9a06e 100644 --- a/source/blender/gpu/intern/gpu_codegen.cc +++ b/source/blender/gpu/intern/gpu_codegen.cc @@ -17,6 +17,8 @@ #include "BLI_ghash.h" #include "BLI_hash_mm2a.h" #include "BLI_link_utils.h" +#include "BLI_listbase.h" +#include "BLI_string.h" #include "BLI_threads.h" #include "BLI_utildefines.h" diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc index 53650c17368..3f0a6b4488d 100644 --- a/source/blender/gpu/intern/gpu_shader_dependency.cc +++ b/source/blender/gpu/intern/gpu_shader_dependency.cc @@ -17,6 +17,7 @@ #include "BLI_ghash.h" #include "BLI_map.hh" +#include "BLI_string.h" #include "BLI_string_ref.hh" #include "gpu_material_library.h" diff --git a/source/blender/gpu/metal/mtl_framebuffer.mm b/source/blender/gpu/metal/mtl_framebuffer.mm index e1b588a4af9..598cce866cb 100644 --- a/source/blender/gpu/metal/mtl_framebuffer.mm +++ b/source/blender/gpu/metal/mtl_framebuffer.mm @@ -6,6 +6,8 @@ * \ingroup gpu */ +#include "BLI_string.h" + #include "BKE_global.h" #include "mtl_context.hh" diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc index 13e1f8bf90c..2bdbd0fea08 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.cc +++ b/source/blender/gpu/opengl/gl_framebuffer.cc @@ -6,6 +6,8 @@ * \ingroup gpu */ +#include "BLI_string.h" + #include "BKE_global.h" #include "gl_backend.hh" diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc index 26488e76ef7..038561eeadb 100644 --- a/source/blender/gpu/opengl/gl_texture.cc +++ b/source/blender/gpu/opengl/gl_texture.cc @@ -9,6 +9,7 @@ #include #include "BLI_assert.h" +#include "BLI_string.h" #include "DNA_userdef_types.h" diff --git a/source/blender/io/alembic/exporter/abc_custom_props.cc b/source/blender/io/alembic/exporter/abc_custom_props.cc index 46be43dba46..4654df9b0d7 100644 --- a/source/blender/io/alembic/exporter/abc_custom_props.cc +++ b/source/blender/io/alembic/exporter/abc_custom_props.cc @@ -18,6 +18,8 @@ #include #include +#include "BLI_listbase.h" + #include "BKE_idprop.h" #include "DNA_ID.h" diff --git a/source/blender/io/common/intern/path_util.cc b/source/blender/io/common/intern/path_util.cc index fe5e7badfda..376515d1c53 100644 --- a/source/blender/io/common/intern/path_util.cc +++ b/source/blender/io/common/intern/path_util.cc @@ -5,6 +5,7 @@ #include "BLI_fileops.h" #include "BLI_path_util.h" +#include "BLI_string.h" namespace blender::io { diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc index 498750f4fcf..7b4f80920e2 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_base.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc @@ -9,6 +9,7 @@ #include "BLI_math_matrix.hh" #include "BLI_path_util.h" #include "BLI_span.hh" +#include "BLI_string.h" #include "DNA_gpencil_legacy_types.h" #include "DNA_layer_types.h" diff --git a/source/blender/io/ply/importer/ply_import.cc b/source/blender/io/ply/importer/ply_import.cc index d0534bba05b..7b200d08adf 100644 --- a/source/blender/io/ply/importer/ply_import.cc +++ b/source/blender/io/ply/importer/ply_import.cc @@ -20,6 +20,7 @@ #include "BLI_math_rotation.h" #include "BLI_math_vector.h" #include "BLI_memory_utils.hh" +#include "BLI_string.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" diff --git a/source/blender/io/ply/importer/ply_import_data.cc b/source/blender/io/ply/importer/ply_import_data.cc index 6a95e7e8e38..853739d5bbd 100644 --- a/source/blender/io/ply/importer/ply_import_data.cc +++ b/source/blender/io/ply/importer/ply_import_data.cc @@ -11,6 +11,7 @@ #include "ply_import_buffer.hh" #include "BLI_endian_switch.h" +#include "BLI_string_ref.hh" #include "fast_float.h" diff --git a/source/blender/io/stl/importer/stl_import.cc b/source/blender/io/stl/importer/stl_import.cc index 16515b756e1..f6f5d032c11 100644 --- a/source/blender/io/stl/importer/stl_import.cc +++ b/source/blender/io/stl/importer/stl_import.cc @@ -21,6 +21,7 @@ #include "BLI_math_rotation.h" #include "BLI_math_vector.h" #include "BLI_memory_utils.hh" +#include "BLI_string.h" #include "DNA_object_types.h" diff --git a/source/blender/io/usd/hydra/hydra_scene_delegate.cc b/source/blender/io/usd/hydra/hydra_scene_delegate.cc index ba45eff554f..f249a70358f 100644 --- a/source/blender/io/usd/hydra/hydra_scene_delegate.cc +++ b/source/blender/io/usd/hydra/hydra_scene_delegate.cc @@ -9,6 +9,7 @@ #include "DNA_scene_types.h" #include "BLI_set.hh" +#include "BLI_string.h" #include "DEG_depsgraph_query.h" diff --git a/source/blender/io/usd/hydra/instancer.cc b/source/blender/io/usd/hydra/instancer.cc index 7f6fa2e8567..3447e8e44b8 100644 --- a/source/blender/io/usd/hydra/instancer.cc +++ b/source/blender/io/usd/hydra/instancer.cc @@ -7,6 +7,8 @@ #include #include +#include "BLI_string.h" + #include "DEG_depsgraph_query.h" #include "hydra_scene_delegate.h" diff --git a/source/blender/io/usd/hydra/mesh.cc b/source/blender/io/usd/hydra/mesh.cc index a334e781d38..b1207807d02 100644 --- a/source/blender/io/usd/hydra/mesh.cc +++ b/source/blender/io/usd/hydra/mesh.cc @@ -6,6 +6,8 @@ #include #include +#include "BLI_string.h" + #include "BKE_material.h" #include "BKE_mesh.hh" #include "BKE_mesh_runtime.hh" diff --git a/source/blender/io/usd/hydra/volume_modifier.cc b/source/blender/io/usd/hydra/volume_modifier.cc index 1d133acd0ca..b5dfbc700fa 100644 --- a/source/blender/io/usd/hydra/volume_modifier.cc +++ b/source/blender/io/usd/hydra/volume_modifier.cc @@ -10,6 +10,7 @@ #include "DNA_volume_types.h" #include "BLI_path_util.h" +#include "BLI_string.h" #include "BKE_mesh.h" #include "BKE_modifier.h" diff --git a/source/blender/io/usd/intern/usd_skel_convert.cc b/source/blender/io/usd/intern/usd_skel_convert.cc index d9bf3fe44a7..478fbeffb19 100644 --- a/source/blender/io/usd/intern/usd_skel_convert.cc +++ b/source/blender/io/usd/intern/usd_skel_convert.cc @@ -34,6 +34,7 @@ #include "BKE_object_deform.h" #include "BLI_math_vector.h" +#include "BLI_string.h" #include "ED_armature.hh" #include "ED_keyframing.hh" diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc index b895dbc60b5..48bd4be570e 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc @@ -14,6 +14,7 @@ #include "BLI_math_vector.h" #include "BLI_math_vector.hh" #include "BLI_path_util.h" +#include "BLI_string.h" #include "DNA_material_types.h" #include "DNA_node_types.h" diff --git a/source/blender/io/wavefront_obj/exporter/obj_exporter.cc b/source/blender/io/wavefront_obj/exporter/obj_exporter.cc index e78e7dea862..043daf428c0 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_exporter.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_exporter.cc @@ -13,6 +13,7 @@ #include "BKE_scene.h" #include "BLI_path_util.h" +#include "BLI_string.h" #include "BLI_task.hh" #include "BLI_vector.hh" diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc index aa83a13236e..96ababe7ac6 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc @@ -9,6 +9,7 @@ #include "BLI_map.hh" #include "BLI_math_color.h" #include "BLI_math_vector.h" +#include "BLI_string.h" #include "BLI_string_ref.hh" #include "BLI_vector.hh" diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc b/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc index 59cf9cb15b7..15d79fd577e 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_mtl.cc @@ -13,6 +13,7 @@ #include "BLI_map.hh" #include "BLI_math_vector.h" #include "BLI_path_util.h" +#include "BLI_string.h" #include "DNA_material_types.h" #include "DNA_node_types.h" diff --git a/source/blender/io/wavefront_obj/importer/obj_import_nurbs.cc b/source/blender/io/wavefront_obj/importer/obj_import_nurbs.cc index ee3345f78d8..bbbbce3b902 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_nurbs.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_nurbs.cc @@ -8,6 +8,7 @@ #include "BKE_object.h" +#include "BLI_listbase.h" #include "BLI_math_vector.h" #include "DNA_curve_types.h" diff --git a/source/blender/io/wavefront_obj/importer/obj_importer.cc b/source/blender/io/wavefront_obj/importer/obj_importer.cc index 683ef35a6c6..c2d58ae34fb 100644 --- a/source/blender/io/wavefront_obj/importer/obj_importer.cc +++ b/source/blender/io/wavefront_obj/importer/obj_importer.cc @@ -12,6 +12,7 @@ #include "BLI_math_vector_types.hh" #include "BLI_set.hh" #include "BLI_sort.hh" +#include "BLI_string.h" #include "BLI_string_ref.hh" #include "BKE_layer.h" diff --git a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc index ca9e11fc0c9..e1fca05ef0c 100644 --- a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc +++ b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc @@ -17,6 +17,7 @@ #include "BLI_fileops.h" #include "BLI_index_range.hh" +#include "BLI_string.h" #include "BLI_string_utf8.h" #include "BLI_vector.hh" diff --git a/source/blender/modifiers/intern/MOD_decimate.cc b/source/blender/modifiers/intern/MOD_decimate.cc index 71b3c4d0f71..73492c4c989 100644 --- a/source/blender/modifiers/intern/MOD_decimate.cc +++ b/source/blender/modifiers/intern/MOD_decimate.cc @@ -6,6 +6,7 @@ * \ingroup modifiers */ +#include "BLI_string.h" #include "BLI_utildefines.h" #include "BLT_translation.h" diff --git a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc index 561a20391c9..f92505926f3 100644 --- a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc +++ b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc @@ -36,6 +36,7 @@ #include "BLI_math_matrix_types.hh" #include "BLI_math_vector.h" #include "BLI_span.hh" +#include "BLI_string.h" #include "BLI_timeit.hh" #include "DEG_depsgraph_query.h" diff --git a/source/blender/nodes/composite/node_composite_tree.cc b/source/blender/nodes/composite/node_composite_tree.cc index 4bf68481725..26e4f488c53 100644 --- a/source/blender/nodes/composite/node_composite_tree.cc +++ b/source/blender/nodes/composite/node_composite_tree.cc @@ -8,6 +8,8 @@ #include +#include "BLI_string.h" + #include "DNA_color_types.h" #include "DNA_node_types.h" #include "DNA_scene_types.h" diff --git a/source/blender/nodes/composite/nodes/node_composite_convert_color_space.cc b/source/blender/nodes/composite/nodes/node_composite_convert_color_space.cc index 9b9ffd7055d..ee73683d105 100644 --- a/source/blender/nodes/composite/nodes/node_composite_convert_color_space.cc +++ b/source/blender/nodes/composite/nodes/node_composite_convert_color_space.cc @@ -8,6 +8,8 @@ #include "RNA_access.hh" +#include "BLI_string.h" + #include "UI_interface.hh" #include "UI_resources.hh" diff --git a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc index dc8898f130b..8830cecf8f9 100644 --- a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc +++ b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc @@ -12,6 +12,7 @@ #include "BLI_dynstr.h" #include "BLI_hash_mm3.h" #include "BLI_math_vector.h" +#include "BLI_string.h" #include "BLI_string_ref.hh" #include "BLI_utildefines.h" diff --git a/source/blender/nodes/composite/nodes/node_composite_image.cc b/source/blender/nodes/composite/nodes/node_composite_image.cc index 97efdb41a90..4d40087fa3e 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.cc +++ b/source/blender/nodes/composite/nodes/node_composite_image.cc @@ -11,6 +11,7 @@ #include "BLI_linklist.h" #include "BLI_math_vector_types.hh" #include "BLI_rect.h" +#include "BLI_string.h" #include "BLI_utildefines.h" #include "BKE_context.h" diff --git a/source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc b/source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc index e0fdf0743a7..ff0a417ccb5 100644 --- a/source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc +++ b/source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc @@ -11,6 +11,7 @@ #include "BLI_math_base.h" #include "BLI_math_color.h" +#include "BLI_string.h" #include "BKE_context.h" #include "BKE_lib_id.h" diff --git a/source/blender/nodes/composite/nodes/node_composite_output_file.cc b/source/blender/nodes/composite/nodes/node_composite_output_file.cc index 14830ace219..86f9eb56b98 100644 --- a/source/blender/nodes/composite/nodes/node_composite_output_file.cc +++ b/source/blender/nodes/composite/nodes/node_composite_output_file.cc @@ -8,6 +8,7 @@ #include +#include "BLI_string.h" #include "BLI_string_utf8.h" #include "BLI_string_utils.h" #include "BLI_utildefines.h" diff --git a/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc b/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc index 7ceeaa46e29..c50d96f9176 100644 --- a/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc +++ b/source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc @@ -9,6 +9,7 @@ #include "BLI_array.hh" #include "BLI_math_matrix_types.hh" #include "BLI_math_vector_types.hh" +#include "BLI_string.h" #include "DNA_defaults.h" #include "DNA_movieclip_types.h" diff --git a/source/blender/nodes/composite/nodes/node_composite_scale.cc b/source/blender/nodes/composite/nodes/node_composite_scale.cc index 76127f0500d..7150c76f299 100644 --- a/source/blender/nodes/composite/nodes/node_composite_scale.cc +++ b/source/blender/nodes/composite/nodes/node_composite_scale.cc @@ -10,6 +10,7 @@ #include "BLI_math_base.hh" #include "BLI_math_matrix.hh" #include "BLI_math_vector_types.hh" +#include "BLI_string.h" #include "RNA_access.hh" diff --git a/source/blender/nodes/composite/nodes/node_composite_trackpos.cc b/source/blender/nodes/composite/nodes/node_composite_trackpos.cc index b7c533bd402..98460353f3e 100644 --- a/source/blender/nodes/composite/nodes/node_composite_trackpos.cc +++ b/source/blender/nodes/composite/nodes/node_composite_trackpos.cc @@ -8,6 +8,7 @@ #include "BLI_index_range.hh" #include "BLI_math_vector_types.hh" +#include "BLI_string.h" #include "DNA_defaults.h" #include "DNA_movieclip_types.h" diff --git a/source/blender/nodes/geometry/node_geometry_tree.cc b/source/blender/nodes/geometry/node_geometry_tree.cc index 6063e7d88f3..54689867747 100644 --- a/source/blender/nodes/geometry/node_geometry_tree.cc +++ b/source/blender/nodes/geometry/node_geometry_tree.cc @@ -4,6 +4,8 @@ #include +#include "BLI_string.h" + #include "MEM_guardedalloc.h" #include "NOD_geometry.hh" diff --git a/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc b/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc index c2eb8ec31d2..aab60120cb5 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc @@ -3,6 +3,7 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ #include "BLI_math_matrix.h" +#include "BLI_string.h" #include "DNA_collection_types.h" diff --git a/source/blender/nodes/geometry/nodes/node_geo_repeat_output.cc b/source/blender/nodes/geometry/nodes/node_geo_repeat_output.cc index f3e77a1bc87..f7832eea692 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_repeat_output.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_repeat_output.cc @@ -2,6 +2,8 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_string.h" + #include "BKE_compute_contexts.hh" #include "BKE_scene.h" diff --git a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc index b40d85fd710..5da869b1202 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc @@ -3,6 +3,7 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ #include "BLI_math_matrix.hh" +#include "BLI_string.h" #include "BLI_string_utils.h" #include "BLI_task.hh" diff --git a/source/blender/nodes/intern/geometry_nodes_execute.cc b/source/blender/nodes/intern/geometry_nodes_execute.cc index 5393acc82be..276c790e923 100644 --- a/source/blender/nodes/intern/geometry_nodes_execute.cc +++ b/source/blender/nodes/intern/geometry_nodes_execute.cc @@ -9,6 +9,7 @@ #include "BLI_math_color.hh" #include "BLI_math_euler.hh" #include "BLI_math_quaternion.hh" +#include "BLI_string.h" #include "NOD_geometry_nodes_execute.hh" #include "NOD_geometry_nodes_lazy_function.hh" diff --git a/source/blender/nodes/intern/geometry_nodes_log.cc b/source/blender/nodes/intern/geometry_nodes_log.cc index e73875618ec..e531fe4ca00 100644 --- a/source/blender/nodes/intern/geometry_nodes_log.cc +++ b/source/blender/nodes/intern/geometry_nodes_log.cc @@ -553,7 +553,10 @@ static void find_tree_zone_hash_recursive( Map GeoModifierLog:: get_context_hash_by_zone_for_node_editor(const SpaceNode &snode, StringRefNull modifier_name) { - const Vector tree_path = snode.treepath; + Vector tree_path; + LISTBASE_FOREACH (const bNodeTreePath *, item, &snode.treepath) { + tree_path.append(item); + } if (tree_path.is_empty()) { return {}; } diff --git a/source/blender/nodes/intern/node_register.cc b/source/blender/nodes/intern/node_register.cc index a0c20f32e30..b116f87e23c 100644 --- a/source/blender/nodes/intern/node_register.cc +++ b/source/blender/nodes/intern/node_register.cc @@ -2,6 +2,8 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_string.h" + #include "NOD_geometry.hh" #include "NOD_register.hh" #include "NOD_socket.hh" diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc index 2470418650a..b8871c5d4db 100644 --- a/source/blender/nodes/intern/node_socket.cc +++ b/source/blender/nodes/intern/node_socket.cc @@ -287,8 +287,17 @@ static void refresh_node_sockets_and_panels(bNodeTree &ntree, ++new_num_panels; } } - Vector old_inputs = node.inputs; - Vector old_outputs = node.outputs; + + Vector old_inputs; + LISTBASE_FOREACH (bNodeSocket *, socket, &node.inputs) { + old_inputs.append(socket); + } + + Vector old_outputs; + LISTBASE_FOREACH (bNodeSocket *, socket, &node.outputs) { + old_outputs.append(socket); + } + Vector old_panels = Vector(node.panel_states()); /* New panel states buffer. */ diff --git a/source/blender/nodes/intern/node_socket_declarations.cc b/source/blender/nodes/intern/node_socket_declarations.cc index c63140a9d2d..0ea791dffcb 100644 --- a/source/blender/nodes/intern/node_socket_declarations.cc +++ b/source/blender/nodes/intern/node_socket_declarations.cc @@ -2,6 +2,8 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_string.h" + #include "NOD_socket_declarations.hh" #include "NOD_socket_declarations_geometry.hh" diff --git a/source/blender/nodes/shader/node_shader_tree.cc b/source/blender/nodes/shader/node_shader_tree.cc index 4deebd3edfc..be57665a05d 100644 --- a/source/blender/nodes/shader/node_shader_tree.cc +++ b/source/blender/nodes/shader/node_shader_tree.cc @@ -21,6 +21,7 @@ #include "BLI_linklist.h" #include "BLI_listbase.h" #include "BLI_math_vector.h" +#include "BLI_string.h" #include "BLI_threads.h" #include "BLI_utildefines.h" #include "BLI_vector.hh" diff --git a/source/blender/nodes/shader/node_shader_util.cc b/source/blender/nodes/shader/node_shader_util.cc index af4aa9b4f55..8bda16bdcff 100644 --- a/source/blender/nodes/shader/node_shader_util.cc +++ b/source/blender/nodes/shader/node_shader_util.cc @@ -10,6 +10,7 @@ #include "DNA_space_types.h" #include "BLI_math_vector.h" +#include "BLI_string.h" #include "BKE_context.h" #include "BKE_node_runtime.hh" diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.cc index 7c3ed358330..bd85d18e459 100644 --- a/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.cc +++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.cc @@ -2,6 +2,8 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_string.h" + #include "node_shader_util.hh" #include "node_util.hh" diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc index aac55545cae..d9028ef974d 100644 --- a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc +++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc @@ -2,6 +2,8 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_string.h" + #include "node_shader_util.hh" #include "UI_interface.hh" diff --git a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.cc b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.cc index fad34c5978c..c3cbf550a40 100644 --- a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.cc +++ b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.cc @@ -4,6 +4,8 @@ #include "node_shader_util.hh" +#include "BLI_string.h" + #include "UI_interface.hh" #include "UI_resources.hh" diff --git a/source/blender/nodes/texture/node_texture_tree.cc b/source/blender/nodes/texture/node_texture_tree.cc index f896065f510..121b71796cd 100644 --- a/source/blender/nodes/texture/node_texture_tree.cc +++ b/source/blender/nodes/texture/node_texture_tree.cc @@ -13,6 +13,7 @@ #include "DNA_texture_types.h" #include "BLI_listbase.h" +#include "BLI_string.h" #include "BLI_threads.h" #include "BLI_utildefines.h"