title: Assimp - How do you import a mesh with textures using any file format?
body: <p>When I import meshes, I get the material, but can't access the file name of the texture.  The .mtl file explicitly shows the filename for the texture.  In the code, it shows a texture count of 1 but the filename field shows an empty string and fullPath outputs "*0".  In the mTexture it does show the texture file extension ".png" but not the filename of the texture itself. Thanks for any help.</p>
  
  <pre><code>    if (scene-&gt;HasMaterials())
      {
          for (unsigned int i = 0; i &lt; scene-&gt;mNumMaterials; ++i)
          {
              aiMaterial* material = scene-&gt;mMaterials[i];
              aiString name;
              material-&gt;Get(AI_MATKEY_NAME, name);
              aiReturn texFound = scene-&gt;mMaterials[i]-&gt;GetTexture(aiTextureType_DIFFUSE, i, &amp;name);
  
              if (material-&gt;GetTextureCount(aiTextureType_DIFFUSE) &gt; 0)
              {
                  aiString path;
                  if (material-&gt;GetTexture(aiTextureType_DIFFUSE, 0, &amp;path, NULL, NULL, NULL, NULL, NULL) == AI_SUCCESS)
                  {
                      std::string fullPath = path.data;
  
  
                  }
              }
          }
      }
  </code></pre>