Rename TextureTypeToString() to aiTextureTypeToString()

Closes: https://github.com/assimp/assimp/issues/4493
pull/4512/head
IOhannes m zmölnig 2022-05-01 13:27:42 +02:00
parent 461370946c
commit 1d3d5c4bb6
7 changed files with 7 additions and 7 deletions

View File

@ -365,7 +365,7 @@ static void WriteDump(const char *pFile, const char *cmd, const aiScene *scene,
ioprintf(io, "\t\t\t<MatProperty key=\"%s\" \n\t\t\ttype=\"%s\" tex_usage=\"%s\" tex_index=\"%u\"", ioprintf(io, "\t\t\t<MatProperty key=\"%s\" \n\t\t\ttype=\"%s\" tex_usage=\"%s\" tex_index=\"%u\"",
prop->mKey.data, sz, prop->mKey.data, sz,
::TextureTypeToString((aiTextureType)prop->mSemantic), prop->mIndex); ::aiTextureTypeToString((aiTextureType)prop->mSemantic), prop->mIndex);
if (prop->mType == aiPTI_Float) { if (prop->mType == aiPTI_Float) {
ioprintf(io, " size=\"%i\">\n\t\t\t\t", ioprintf(io, " size=\"%i\">\n\t\t\t\t",

View File

@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/material.h> #include <assimp/material.h>
// ------------------------------------------------------------------------------- // -------------------------------------------------------------------------------
const char *TextureTypeToString(aiTextureType in) { const char *aiTextureTypeToString(aiTextureType in) {
switch (in) { switch (in) {
case aiTextureType_NONE: case aiTextureType_NONE:
return "n/a"; return "n/a";

View File

@ -590,7 +590,7 @@ void PbrtExporter::WriteMaterial(int m) {
for (int i = 1; i <= aiTextureType_UNKNOWN; i++) { for (int i = 1; i <= aiTextureType_UNKNOWN; i++) {
int count = material->GetTextureCount(aiTextureType(i)); int count = material->GetTextureCount(aiTextureType(i));
if (count > 0) if (count > 0)
mOutput << TextureTypeToString(aiTextureType(i)) << ": " << count << " "; mOutput << aiTextureTypeToString(aiTextureType(i)) << ": " << count << " ";
} }
mOutput << "\n"; mOutput << "\n";

View File

@ -415,7 +415,7 @@ void ComputeUVMappingProcess::Execute( aiScene* pScene)
if (!DefaultLogger::isNullLogger()) if (!DefaultLogger::isNullLogger())
{ {
ai_snprintf(buffer, 1024, "Found non-UV mapped texture (%s,%u). Mapping type: %s", ai_snprintf(buffer, 1024, "Found non-UV mapped texture (%s,%u). Mapping type: %s",
TextureTypeToString((aiTextureType)prop->mSemantic),prop->mIndex, aiTextureTypeToString((aiTextureType)prop->mSemantic),prop->mIndex,
MappingTypeToString(mapping)); MappingTypeToString(mapping));
ASSIMP_LOG_INFO(buffer); ASSIMP_LOG_INFO(buffer);

View File

@ -521,7 +521,7 @@ void ValidateDSProcess::Validate(const aiAnimation *pAnimation) {
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial *pMaterial, void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial *pMaterial,
aiTextureType type) { aiTextureType type) {
const char *szType = TextureTypeToString(type); const char *szType = aiTextureTypeToString(type);
// **************************************************************************** // ****************************************************************************
// Search all keys of the material ... // Search all keys of the material ...

View File

@ -335,7 +335,7 @@ enum aiTextureType {
// ------------------------------------------------------------------------------- // -------------------------------------------------------------------------------
// Get a string for a given aiTextureType // Get a string for a given aiTextureType
ASSIMP_API const char *TextureTypeToString(enum aiTextureType in); ASSIMP_API const char *aiTextureTypeToString(enum aiTextureType in);
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Defines all shading models supported by the library /** @brief Defines all shading models supported by the library

View File

@ -441,7 +441,7 @@ int Assimp_Info(const char *const *params, unsigned int num) {
prop->mKey.data, prop->mKey.data,
prop->mIndex, prop->mIndex,
prop->mDataLength, prop->mDataLength,
TextureTypeToString(textype)); aiTextureTypeToString(textype));
} }
} }
if (scene->mNumMaterials) { if (scene->mNumMaterials) {