On 20/07/2015 at 02:16, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R16
Platform: Windows ;
Language(s) : C++ ;
---------
Hello.
How can i get the bitmap data of a MaterialPreviewData?
I can't find anything in MaterialPreviewData that allows me to do that.
I need a function that returns void * or char* that describe the RGB values of the Material Preview.
BaseContainer *data = getData();
if (data){
GeData previewData = data->GetData(MATERIAL_PREVIEW);
if (previewData.GetType() == CUSTOMDATATYPE_MATPREVIEW) {
MaterialPreviewData* preview =(MaterialPreviewData* )previewData.GetCustomDataType(CUSTOMDATATYPE_MATPREVIEW);
if (preview){
//use the preview data here.
}
}
}
Thank you for your time.