From 79cba055b9fed3a9419caed2cf33501bab708fda Mon Sep 17 00:00:00 2001 From: leliel Date: Tue, 25 Mar 2025 21:03:52 +0000 Subject: [PATCH] feat: created the aiGetStringC_Str() function. (#6059) * feat: created the aiGetStringC_Str() function. The C++ Interface's function C_Str() from the aiString struct was missing an equivalent function for the C Interface. * changed the first parameter of the aiGetStringC_Str function to be const. --------- Co-authored-by: Kim Kulling --- code/Material/MaterialSystem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/Material/MaterialSystem.cpp b/code/Material/MaterialSystem.cpp index b4af3339f..116ed1f7b 100644 --- a/code/Material/MaterialSystem.cpp +++ b/code/Material/MaterialSystem.cpp @@ -401,6 +401,12 @@ aiReturn aiGetMaterialString(const aiMaterial *pMat, return AI_SUCCESS; } +// ------------------------------------------------------------------------------------------------ +// Get a c-like string fron an aiString +const char *aiGetStringC_Str(const aiString *str) { + return str->data; +} + // ------------------------------------------------------------------------------------------------ // Get the number of textures on a particular texture stack unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial *pMat, C_ENUM aiTextureType type) {