On 20/06/2015 at 08:42, xxxxxxxx wrote:
Cinema 4D Version: 15+
Platform: Windows ;
Language(s) : C++ ;
I want to add tabs inside description "dynamically", but I don't know how, I just need a minimum example, searched a lot on the forums and didn't find anything.
On 29/06/2015 at 08:06, xxxxxxxx wrote:
just so we are on the same page and I'm not searching into the wrong direction. You have for example an ObjectData plugin with a Description in Attribute Manager. There are those quick tabs "Basic", "Coord.", "Object" and "Phong" (last two depending on the object). And you want to add new groups to this list dynamically in GetDDescription(), right?
On 29/06/2015 at 16:46, xxxxxxxx wrote:
not these groups "I can add to these groups dynamically by adding a group to parent (0)"
what I want is a similar interface to these "Basic", "coord" ,... inside!!.
On 30/06/2015 at 07:44, xxxxxxxx wrote:
no really good news for you.
There are actually two kinds of "quick tabs".
One is a CustomGUI for the LONG (Int32) datatype. You can see an example of this in the Character object (those yellow/orange tabs). It does not allow multiple selection. This one can be created dynamically in GetDDescription(), unfortunately the define is missing in the SDK. Just use a define of your own, like in the following code:
#define ID_QUICKTABSRADIO_GADGET 200000281
// in GetDDescription() :
const DescID * const singleid = description->GetSingleDescID();
const Int32 id = 0x10000; // YOUR DESCRIPTION ID
const DescID cid = DescLevel(id, DTYPE_LONG, 0);
if (!singleid || cid.IsPartOf(*singleid, nullptr))
BaseContainer bc = GetCustomDataTypeDefault(DTYPE_LONG);
// quicktab elements
items.SetString(0, String("Tab 0"));
items.SetString(1, String("Tab 1"));
items.SetString(2, String("Tab 2"));
description->SetParameter(cid, bc, DescLevel(ID_GROUP_DYAMIC));
And then there's the "real" quicktabs, which allow multiple selection, just as the ones on top of the Attribute Manager. Unfortunately this can't be created in a description, neither statically in the .res file, nor dynamically in GetDDescription(). It can only be used in dialogs. Sorry.
On 30/06/2015 at 08:52, xxxxxxxx wrote:
great Andreas , I don't need multiple selections "and BTW my code for quicktabs was very similar to yours, EXCEPT that I didn't find the CustomGui ID #definition which I was missing"
will test it soon, but I think you can consider this as solved.