Skip to content

fix(VTPSurfaceOutput): own texture names - #217

Merged
BotellaA merged 2 commits into
nextfrom
fix/grid-graph-texture
Oct 19, 2026
Merged

BotellaA merged 2 commits into
nextfrom
fix/grid-graph-texture

Conversation

@BotellaA

Copy link
Copy Markdown
Member

Companion of Geode-solutions/OpenGeode#1358: `texture_names()` now returns owning `std::string`.

  • `VTPSurfaceOutputImpl::textures_info_` stores `std::string` instead of `std::string_view` (the views would point into the temporary array returned by `texture_names()`).
  • Loops over `texture_names()` take names by `const auto&`.

Not built locally; relies on CI against the OpenGeode branch.

🤖 Generated with Claude Code

TextureManager::texture_names() now returns owning std::string
(Geode-solutions/OpenGeode#1358). Store the names as std::string in
textures_info_ instead of views on the returned temporary array.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 20 concern(s)
  • include/geode/io/mesh/detail/vtp_surface_output_impl.hpp:35:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

       35 | namespace geode
          | ^~~~~~~~~~~~~~~
       36 | {
          | ~
       37 |     namespace detail
          |     ~~~~~~~~~~~~~~~~
          |     namespace geode::detail
  • include/geode/io/mesh/detail/vtp_surface_output_impl.hpp:127:45: warning: [readability-identifier-length]

    variable name 'pv' is too short, expected at least 3 characters

      127 |                         const PolygonVertex pv{ p, v };
          |                                             ^
  • include/geode/io/mesh/detail/vtp_surface_output_impl.hpp:139:36: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      139 |                         const auto it = vertex_textures.try_emplace(
          |                                    ^
  • src/geode/io/mesh/assimp_input.cpp:58:54: warning: [readability-identifier-length]

    parameter name 'v' is too short, expected at least 3 characters

       58 |             [&assimp_mesh, &builder]( geode::index_t v ) {
          |                                                      ^
  • src/geode/io/mesh/assimp_input.cpp:59:38: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

       59 |                 const auto& vertex = assimp_mesh.mVertices[v];
          |                                      ^
  • src/geode/io/mesh/assimp_input.cpp:65:32: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

       65 |             const auto& face = assimp_mesh.mFaces[p];
          |                                ^
  • src/geode/io/mesh/assimp_input.cpp:70:39: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

       70 |                 polygon_vertices[i] = face.mIndices[i];
          |                                       ^
  • src/geode/io/mesh/assimp_input.cpp:79:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

       79 | namespace geode
          | ^~~~~~~~~~~~~~~
       80 | {
          | ~
       81 |     namespace internal
          |     ~~~~~~~~~~~~~~~~~~
          |     namespace geode::internal
  • src/geode/io/mesh/assimp_input.cpp:89:32: warning: [readability-implicit-bool-conversion]

    implicit conversion 'const aiScene *' -> 'bool'

       89 |             return Percentage{ assimp_scene ? 1. : 0. };
          |                                ^
          |                                (            != nullptr)
  • src/geode/io/mesh/assimp_input.cpp:108:39: warning: [readability-function-cognitive-complexity]

    function 'read_textures' has cognitive complexity of 13 (threshold 10)

      108 |         void AssimpMeshInput< Mesh >::read_textures(
          |                                       ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:111:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      111 |             for( const auto i : Range{ assimp_scene->mNumMeshes } )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:114:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      114 |                 if( !assimp_mesh.HasTextureCoords( 0 ) )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:122:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      122 |                 for( const auto p : Range{ assimp_mesh.mNumFaces } )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:125:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      125 |                     for( const auto v : LRange{ face.mNumIndices } )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:134:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      134 |                 if( !material.second.empty() )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:141:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      141 |                     catch( const OpenGeodeException& e )
          |                     ^
  • src/geode/io/mesh/assimp_input.cpp:113:44: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

      113 |                 const auto& assimp_mesh = *assimp_scene->mMeshes[i];
          |                                            ^
  • src/geode/io/mesh/assimp_input.cpp:124:40: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

      124 |                     const auto& face = assimp_mesh.mFaces[p];
          |                                        ^
  • src/geode/io/mesh/assimp_input.cpp:127:50: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

      127 |                         const auto mesh_vertex = face.mIndices[v];
          |                                                  ^
  • src/geode/io/mesh/assimp_input.cpp:129:29: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

      129 |                             assimp_mesh.mTextureCoords[0][mesh_vertex];
          |                             ^
  • src/geode/io/mesh/assimp_input.cpp:159:46: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

      159 |                         build_mesh< Mesh >( *assimp_scene->mMeshes[i] );
          |                                              ^
  • src/geode/io/mesh/assimp_input.cpp:170:58: warning: [readability-function-cognitive-complexity]

    function 'merge_meshes' has cognitive complexity of 15 (threshold 10)

      170 |         std::unique_ptr< Mesh > AssimpMeshInput< Mesh >::merge_meshes()
          |                                                          ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:175:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      175 |             for( const auto& surface : surfaces_ )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:186:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      186 |             for( const auto s : Indices{ surfaces_ } )
          |             ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:190:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      190 |                 for( const auto& name : manager.texture_names() )
          |                 ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:196:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      196 |                     for( const auto p : Range{ mesh->nb_polygons() } )
          |                     ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:200:25: note: +4, including nesting penalty of 3, nesting level increased to 4
      200 |                         if( merged_polygon == NO_ID )
          |                         ^
    /__w/OpenGeode-IO/OpenGeode-IO/src/geode/io/mesh/assimp_input.cpp:204:25: note: +4, including nesting penalty of 3, nesting level increased to 4
      204 |                         for( const auto v :
          |                         ^
  • src/geode/io/mesh/assimp_input.cpp:186:29: warning: [readability-identifier-length]

    variable name 's' is too short, expected at least 3 characters

      186 |             for( const auto s : Indices{ surfaces_ } )
          |                             ^
  • src/geode/io/mesh/assimp_input.cpp:224:17: warning: [llvm-qualified-auto]

    'const auto material' can be declared as 'auto *const material'

      224 |                 const auto material = assimp_scene->mMaterials[i];
          |                 ^~~~~~~~~~
          |                 auto *const 
  • src/geode/io/mesh/assimp_input.cpp:224:39: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

      224 |                 const auto material = assimp_scene->mMaterials[i];
          |                                       ^
  • src/geode/io/mesh/assimp_input.cpp:234:26: warning: [readability-identifier-naming]

    invalid case style for variable 'Path'

      234 |                 aiString Path;
          |                          ^~~~
          |                          path
      235 |                 if( material->GetTexture( aiTextureType_DIFFUSE, 0, &Path,
          |                                                                      ~~~~
          |                                                                      path
      236 |                         nullptr, nullptr, nullptr, nullptr, nullptr )
      237 |                     == AI_SUCCESS )
      238 |                 {
      239 |                     materials_[i].second = absl::StrCat(
      240 |                         filepath_without_filename( file_ ).string(),
      241 |                         Path.C_Str() );
          |                         ~~~~
          |                         path

Have any feedback or feature suggestions? Share it here.

@BotellaA
BotellaA requested review from BenPinet and panquez October 19, 2026 08:28
@BotellaA
BotellaA merged commit fb2a496 into next Oct 19, 2026
24 checks passed
@BotellaA
BotellaA deleted the fix/grid-graph-texture branch October 19, 2026 17:58
@BotellaA

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 7.11.3-rc.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@BotellaA

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 7.11.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants