show subchannels from GetDDescription() [SOLVED]
-
On 07/05/2015 at 15:11, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 15+
Platform: Windows ;
Language(s) : C++ ;---------
I want to show subchannels "like in coordinate interface for any object" , so if I have 3 vectors they appear in 3 columns instead of 3 rows. -
On 08/05/2015 at 00:08, xxxxxxxx wrote:
Hi Mohamed,
To place description parameters in columns use LAYOUTGROUP flag followed by the number of columns in the current GROUP. See Obase description resource file to understand how "Coordinates" group is built for objects.
If you need to do that dynamically set DESC_LAYOUTGROUP and DESC_COLUMNS in the description container for the added group.Also if it's not the case you'd have to set CUSTOMGUI_SUBDESCRIPTION for DESC_CUSTOMGUI in the description container for the added parameters so that the vectors component are shown in line layout.
-
On 08/05/2015 at 04:44, xxxxxxxx wrote:
thanks Yannick. I think I missed CUSTOMGUI_SUBDSCRIPTION when I was reading the header!! "shame on me"
-
On 09/05/2015 at 13:31, xxxxxxxx wrote:
when I did this
bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_SUBDESCRIPTION);
it works, but when I change any value of x or y or z, all 3 change, any idea what causes this?
-
On 11/05/2015 at 00:24, xxxxxxxx wrote:
Originally posted by xxxxxxxx
when I did this
bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_SUBDESCRIPTION);
it works, but when I change any value of x or y or z, all 3 change, any idea what causes this?
How is the parameter declared? In the resource file or dynamically in GetDDescription()?
Please provide the resource file or GetDDescription() definition/declaration. -
On 11/05/2015 at 01:43, xxxxxxxx wrote:
it is in GetDDescription()
cid = DescLevel(ids, DTYPE_VECTOR, 0); if (!singleid || cid.IsPartOf(*singleid, nullptr))// important to check for speedup c4d! { BaseContainer dt = GetCustomDataTypeDefault(DTYPE_VECTOR); std::string dName = kndData->nodes[kndData->selectedNode].getInputDataName(i); String dtName(dName.c_str()); dt.SetString(DESC_SHORT_NAME, dtName); dt.SetString(DESC_NAME, dtName); dt.SetBool(DESC_ANIMATE, DESC_ANIMATE_ON); dt.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_SUBDESCRIPTION); //dt.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_VECTOR); if (!description->SetParameter(cid, dt, DescLevel(Tbaselist2d))) return true; }
-
On 11/05/2015 at 01:53, xxxxxxxx wrote:
the whole code can be found here, https://developers.maxon.net/forum/topic/8706/11403_huge-problem-with-getddescription-solved
-
On 11/05/2015 at 08:55, xxxxxxxx wrote:
You need to call the macro HandleDescSetVector() in SetDParameter() so that the components are set as expected.
See datatype.cpp SDK example and ExampleDataTypeClass::SetDParameter() use of HandleDescSetVector(). -
On 16/05/2015 at 10:06, xxxxxxxx wrote:
Hi Yannick,
I tested it and it works great , thanks.
you can mark this as solved