LISTVIEW in Attributemanager

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 11/05/2012 at 02:08, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   13 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
Hello,

I'm creating a tag plugin and need an LISTVIEW element (like for dialogs) in the container, which should appears in the Attributemanager. But unfortunately this element is only for dialogs available. Is there a simple way to using this also in the basecontainer of a tag?

regards
Markus

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/05/2012 at 02:34, xxxxxxxx wrote:

Hi Marky,
the following seems to get something showing in R12, you may be able to adapt for R13? I use it in the GetDDescription().

cid_Tree = DescLevel(ID_OF_TREE_HERE, CUSTOMGUI_TREEVIEW, 0);  
if (!id_Tree || cid_Tree.IsPartOf(*id_Tree,NULL))  
{  
BaseContainer locked = GetCustomDataTypeDefault(CUSTOMGUI_TREEVIEW);  
locked.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_TREEVIEW);  
locked.SetBool(DESC_HIDE, Data_Bank);  
locked.SetLong(TREEVIEW_BORDER, BORDER_BLACK);  
locked.SetBool(TREEVIEW_OUTSIDE_DROP, TRUE);  
locked.SetBool(TREEVIEW_HAS_HEADER, TRUE);  
locked.SetLong(DESC_ANIMATE, DESC_ANIMATE_OFF);  
locked.SetString(DESC_NAME, "Treeview");  
locked.SetString(DESC_SHORT_NAME, "Treeview");  
if (!description->SetParameter(cid_Tree, locked, DescLevel(ID_TAB_TREEVIEW))) return TRUE;  
}

Hope this helps!
 
WP

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/05/2012 at 10:04, xxxxxxxx wrote:

Could you possibly post a more complete example of this WP?

There's a lot off specific resource files needed for this. And I'm having a hard time figuring it out how to recreate all those .h, .res, .str files based on your little .cpp snippet.

-ScottA

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/05/2012 at 17:52, xxxxxxxx wrote:

Hi Scott,
 
I'll try...!! I'm not really sure what to add being just a beginner at this but...
 
Basically the code snippet above goes straight into the GetDDescription(). I don't use any external resource files to build the AM. Just a preference I have to keep everything in the same .cpp file I guess. However I did need to add this header:

#include "..\..\..\resource\_api\c4d_customgui\customgui_listview.h"

If you search for TREEVIEW in the sdk browser and select the TREEVIEW_Settings you should get a list of flags to use with it. I did have some troubles getting anything to work with what I have above - such as dragging and dropping an object to the list - but I didn't spend much time trying to recreate that side of it.
 
If you can bare with me for a day or two I'll see if I can add a bit more functionality to it.
 
Kind regards,
 
Phil - a.k.a. WickedP!

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/05/2012 at 19:22, xxxxxxxx wrote:

Thanks,

But the problem I'm having is you have some custom things in your code. Things that are not defined in that customgui_listview.h file.
And you don't show where they come from. So they are undefined when I paste your code into my own tag plugin.

    DescID cid_Tree;  
  cid_Tree = DescLevel(ID_OF_TREE_HERE, CUSTOMGUI_TREEVIEW, 0);     //ID_OF_TREE_HERE?...where is this in your files?  
  if(!id_Tree || cid_Tree.IsPartOf(*id_Tree,NULL))                  //id_Tree?.......... where is this in your files?         
  {  
   BaseContainer locked = GetCustomDataTypeDefault(CUSTOMGUI_TREEVIEW);  
   locked.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_TREEVIEW);  
   locked.SetBool(DESC_HIDE, Data_Bank);                            //Data_Bank? ........where is this in your files?   
   locked.SetLong(TREEVIEW_BORDER, BORDER_BLACK);  
   locked.SetBool(TREEVIEW_OUTSIDE_DROP, TRUE);  
   locked.SetBool(TREEVIEW_HAS_HEADER, TRUE);  
   locked.SetLong(DESC_ANIMATE, DESC_ANIMATE_OFF);  
   locked.SetString(DESC_NAME, "Treeview");  
   locked.SetString(DESC_SHORT_NAME, "Treeview");  
   if(!description->SetParameter(cid_Tree, locked, DescLevel(ID_TAB_TREEVIEW))) return TRUE; //ID_TAB_TREEVIEW?...where is this in your files?   
  }

Someplace in your code you have these custom things defined.
I've tried to substitute the items that are undefined with various things. But when I do that I can't get a tree gui to show up in my tag's AM at all.

-ScottA

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/05/2012 at 19:51, xxxxxxxx wrote:

Ah - my apologies Scott,
 
I see what you mean now. See if the following is of more help:

enum  
{  
 ID_TAB_TREE = 50000,  
 ID_TAB_TREEVIEW,  
 ID_OF_TREE_HERE,  
};
 
// and then the Description function:
 
Bool EXPERIMENTS::GetDDescription(GeListNode *node, Description *description, DESCFLAGS_DESC & flags)  
{  
  Bool Data_Bank;
     const DescID *id_Tree = description->GetSingleDescID();       // THE "TREE" TAB
 
 Data_Bank = FALSE;
 
 DescID cid_Tree = DescLevel(ID_TAB_TREE, DTYPE_GROUP, 0);  
 if (!id_Tree || cid_Tree.IsPartOf(*id_Tree,NULL))  
 {  
 BaseContainer group = GetCustomDataTypeDefault(DTYPE_GROUP);  
 group.SetBool(DESC_HIDE, Data_Bank);  
 group.SetString(DESC_NAME, "Tree Tab");  
 group.SetString(DESC_SHORT_NAME, "Tree Tab");  
 if (!description->SetParameter(cid_Tree, group, DescLevel(0))) return TRUE;  
 }
 
 cid_Tree = DescLevel(ID_TAB_TREEVIEW, DTYPE_GROUP, 0);  
 if (!id_Tree || cid_Tree.IsPartOf(*id_Tree,NULL))  
 {  
 BaseContainer subgroup = GetCustomDataTypeDefault(DTYPE_GROUP);  
 subgroup.SetLong(DESC_COLUMNS, 1);  
 subgroup.SetBool(DESC_HIDE, Data_Bank);  
 subgroup.SetString(DESC_NAME, "");  
 subgroup.SetString(DESC_SHORT_NAME, "");  
 if (!description->SetParameter(cid_Tree, subgroup, DescLevel(ID_TAB_TREE))) return TRUE;  
 }
 
  cid_Tree = DescLevel(ID_OF_TREE_HERE, CUSTOMGUI_TREEVIEW, 0);  
if (!id_Tree || cid_Tree.IsPartOf(*id_Tree,NULL))  
{  
BaseContainer locked = GetCustomDataTypeDefault(CUSTOMGUI_TREEVIEW);  
locked.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_TREEVIEW);  
locked.SetBool(DESC_HIDE, Data_Bank);  
locked.SetLong(TREEVIEW_BORDER, BORDER_BLACK);  
locked.SetBool(TREEVIEW_OUTSIDE_DROP, TRUE);  
locked.SetBool(TREEVIEW_HAS_HEADER, TRUE);  
locked.SetLong(DESC_ANIMATE, DESC_ANIMATE_OFF);  
locked.SetString(DESC_NAME, "Treeview");  
locked.SetString(DESC_SHORT_NAME, "Treeview");  
if (!description->SetParameter(cid_Tree, locked, DescLevel(ID_TAB_TREEVIEW))) return TRUE;  
}
  
flags |= DESCFLAGS_DESC_LOADED;
return TRUE;
}  

Is that more of what you were after?
 
WP.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/05/2012 at 20:08, xxxxxxxx wrote:

Yeah. That's what I needed.
Thanks.🍺

-ScottA

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/05/2012 at 23:58, xxxxxxxx wrote:

hi, thanks for your help WP. I will try it out...👍