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:
Cinema 4D Version: 9.6
Platform: Windows ;
Language(s) : C++ ;
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)
op = op->GetNext();
void Sort::sortalg(Bool *loc1,Bool *loc2,Bool *loc3)
BaseDocument *mydoc = BaseDocument::Alloc();
mydoc = GetActiveDocument();
BaseMaterial *op = mydoc->GetFirstMaterial();
On 28/11/2006 at 05:44, xxxxxxxx wrote:
I know that i have a never ending loop too, how can ein check if it is the last material?
On 28/11/2006 at 05:58, xxxxxxxx wrote:
you could try
BaseDocument* pDocument = GetActiveDocument();
BaseMaterial* pMat = pDocument->GetFirstMaterial();
... do something here
pMat = pMat->GetNext();
last material is NULL
On 28/11/2006 at 06:15, xxxxxxxx wrote:
Hm, no it does not select anything
On 28/11/2006 at 06:18, xxxxxxxx wrote:
Could it be that window maust be refreshed?
On 28/11/2006 at 06:26, xxxxxxxx wrote:
Ho no, all mat have been selecte but this will be not shown in cinema if it is not refreshed.
On 28/11/2006 at 08:10, xxxxxxxx wrote:
well, the loop just iterated throughout all the materials the "... do something here" part was the code needed to select them