2
0
Эх сурвалжийг харах

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 <[email protected]>
leliel 5 сар өмнө
parent
commit
79cba055b9

+ 6 - 0
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) {