Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

How to get the path of texture

Anonymous
Not applicable
Hi,

How could I get the path of texture? I am trying to export the model by using Modeler::element, but I could not find the way to get the texture file location.

Could you help me? Thanks in advance.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Ralph Wessel
Mentor
scandi wrote:
How could I get the path of texture? I am trying to export the model by using Modeler::element, but I could not find the way to get the texture file location.Could you help me?
A body texture image is best accessed through a body material using ModelerAPI::MeshBody::GetMaterial
You can get the texture for the material using ModelerAPI::Material::GetTexture
The texture bitmap (if it has one) can be accessed from the texture using ModelerAPI::Texture::GetPixelMap
Ralph Wessel BArch
Software Engineer Speckle Systems

View solution in original post

2 REPLIES 2
Solution
Ralph Wessel
Mentor
scandi wrote:
How could I get the path of texture? I am trying to export the model by using Modeler::element, but I could not find the way to get the texture file location.Could you help me?
A body texture image is best accessed through a body material using ModelerAPI::MeshBody::GetMaterial
You can get the texture for the material using ModelerAPI::Material::GetTexture
The texture bitmap (if it has one) can be accessed from the texture using ModelerAPI::Texture::GetPixelMap
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Ralph wrote:
scandi wrote:
How could I get the path of texture? I am trying to export the model by using Modeler::element, but I could not find the way to get the texture file location.Could you help me?
A body texture image is best accessed through a body material using ModelerAPI::MeshBody::GetMaterial
You can get the texture for the material using ModelerAPI::Material::GetTexture
The texture bitmap (if it has one) can be accessed from the texture using ModelerAPI::Texture::GetPixelMap
I see. Thank you!