THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/06/2011 at 10:14, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : C.O.F.F.E.E ; PYTHON ;
---------
Hi,
I've tried everything I can think of. But I can't figure out how to change the icon previews on materials.
I started with the basics:
var mat = doc->GetActiveMaterial();
mat#MatPreviewFlat2D = true; //<---invalid ID
Then I tried getting at them from the material's container:
var mat = doc->GetActiveMaterial();
var bc = mat->GetContainer();
var preview = bc->SetData(MatPreviewFlat2D, true);//<--- member not found
bc->SetContainer(preview);
Then I thought maybe that they weren't held by the material.
But held by another object(ID_MATERIAL_PREVIEW) inside of the material:
//No errors...But it doesn't do anything
var mat = doc->GetActiveMaterial();
var preview = mat#ID_MATERIAL_PREVIEW;
preview = MatPreviewFlat2D;
CallCommand(12252); // Render Materials updates the ICON
Nope.
Can anyone tell me what I'm doing wrong?
If it's not possible in Coffee. Then a Python or C++ solution is ok.
Thanks,
-ScottA
*Edit:
After more looking. I found a preview class in the C++ SDK.
It has a SetPreviewType(MatPreviewType t) method in it.
But I could not find these in the Python and Coffee SDK's. So does that mean that this is only supported in C++?