Skip to content

Exporting GLTF with material labels #597

Answered by dpasukhi
SeiteBroken asked this question in Q&A
Discussion options

You must be logged in to vote

XCAFDoc_VisMaterialTool is a main tool to work with material and textures for XCAF.
To work with that tool you need to have similar sample:

// Creates tool itself
Handle(XCAFDoc_VisMaterialTool) aVMTool = XCAFDoc_DocumentTool::VisMaterialTool(myXdeDoc->Main());
// Creates material, see XCAFDoc_VisMaterial
Handle(XCAFDoc_VisMaterial) aMat = new XCAFDoc_VisMaterial();
// Sample for common type
XCAFDoc_VisMaterialCommon aMatXde;
aMatXde.IsDefined     = true;
aMatXde.AmbientColor  = theMaterial->AmbientColor;
aMatXde.DiffuseColor  = theMaterial->DiffuseColor;
aMatXde.SpecularColor = theMaterial->SpecularColor;
aMatXde.Shininess     = theMaterial->Shininess;
aMatXde.Transparency  = theMaterial…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@SeiteBroken
Comment options

@dpasukhi
Comment options

@SeiteBroken
Comment options

@dpasukhi
Comment options

@SeiteBroken
Comment options

Answer selected by dpasukhi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
1. Data Exchange Import/Export or iterating of the CAD data
3 participants
Converted from issue

This discussion was converted from issue #596 on July 07, 2025 19:15.