How to get Custom Colors from Appearance via API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
We need to get all color information for all parts from Fusion model via API. I need this information for my plugin for Fusion360.
We are facing issue when colors are overridden and applied as custom appearances. We get incorrect color values from API when custom colors are applied.
Please refer following code snippet,
adsk::core::Ptr<adsk::fusion::BRepFaces> bfaces = body->faces();
adsk::core::Ptr<adsk::fusion::BRepFace> face = bfaces->item(0);
adsk::core::Ptr<adsk::core::ColorProperty> colorprop = nullptr;
colorprop = face->appearance()->appearanceProperties()->itemById("wood_early_color");
We are using following IDs to get color properties.
"opaque_albedo"
"metal_f0"
"layered_diffuse"
"transparent_color"
"wood_early_color"
Should we use any other IDs to get correct colors from Appearance? Or is there some other API to get correct Custom Colors values from Appearance via API?
Thank you for all your help.
Regards,
Mahesh