get Count of existing preset libraries [SOLVED]

On 20/08/2015 at 00:02, xxxxxxxx wrote:

User Information:
Cinema 4D Version:    
Platform:      
Language(s) :

---------
To browse preset libraries you need to specify a db_index in Alloc.

AutoAlloc<SDKBrowsePresets> lib(db_index);

If i want to parse all that are present i would need to how many there are. How do i get this value?

On 20/08/2015 at 03:32, xxxxxxxx wrote:

Hello,

to browse the content of the preset library you could also use the category node returned by GetCategoryNode(). This could look like this:

  
SDKBrowserContentNodeRef ref = SDKBrowser::GetCategoryNode(SDKBrowser::CategoryPresetNodes);  
if (!ref)   
 return false;  
  
for (ref = ref->GetDown(); ref; ref = ref->GetNext())  
{  
 GePrint(ref->GetName());  
  
 // Check child elements  
 SDKBrowserContentNodeRef child = ref->GetDown();  
  
 while (child)  
 {  
     GePrint("----" + child->GetName());  
     child = child->GetNext();  
 }  
}  

best wishes,
Sebastian

On 20/08/2015 at 06:36, xxxxxxxx wrote:

that seems to work
thanks Sebastian!