Now I want to read the skp file and display it in my view. I have obtained the information of the triangulation. Now I need material information and texture information. Therefore, I found the sdk, “SU_EXPORT SUTextureRef SUTextureFromEntity(SUEntityRef entity);” to get the texture through the entity. However, there is always no texture. I will give the code below, I hope that God will explain it to me. Grateful
aTru = SUEntityListIteratorNext(iterator);
SUEntityRef pEnt = SU_INVALID;
aTru = SUEntityListIteratorGetEntity(iterator, &pEnt);
SUTextureRef atexture = SU_INVALID;
atexture = SUTextureFromEntity(pEnt);
if (SUIsValid(atexture))
{
atexture = SUTextureFromEntity(pEnt);
}
why atexture is empty?Is my way wrong?
I used the following method to convert SUEntitiesRef to SUEntityRef and then read the texture.
SU_RESULT SUEntitiesEntityListFill(SUEntitiesRef entities,enum SURefType type, SUEntityListRef list);
SU_RESULT SUEntityListBegin(SUEntityListRef list,SUEntityListIteratorRef* iterator);
SU_RESULT SUEntityListIteratorGetEntity(SUEntityListIteratorRef iterator,SUEntityRef* entity);
SU_EXPORT SUTextureRef SUTextureFromEntity(SUEntityRef entity);
I hope to help me answer!please!!!thanks!!!