THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/11/2006 at 05:38, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.6
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
i would like to select every single material in the meterialmanager step by step. My code dont work could someone help me.
void matree (BaseDocument *doc, BaseMaterial *op,Bool *loc1,Bool *loc2,Bool *loc3)
{
while(op)
{
doc->SetActiveMaterial(op,SELECTION_ADD);//
//matree(doc,op->GetNext(),loc1,loc2,loc3);
op = op->GetNext();
}
}
void Sort::sortalg(Bool *loc1,Bool *loc2,Bool *loc3)
{
BaseDocument *mydoc = BaseDocument::Alloc();
mydoc = GetActiveDocument();
BaseMaterial *op = mydoc->GetFirstMaterial();
mydoc->SetActiveMaterial(op,SELECTION_NEW);
matree(mydoc, op,loc1,loc2,loc3);
BaseDocument::Free(mydoc);
MessageDialog("TESTSTRING");
}