On 24/04/2015 at 05:33, xxxxxxxx wrote:
Hi,
I've finally got it working, but the only problem is that my slider gets duplicated, which is not what I want.
I'm going to have a complex user interface, so doubling my sliders is bad.
Here is my code:
Bool MyPluginData::GetDDescription(GeListNode* node, Description* description, DESCFLAGS_DESC& flags)
{
if (!description->LoadDescription(node->GetType()))
return false;
const DescID* singleid = description->GetSingleDescID();
DescID cid = DescLevel(10002, DTYPE_REAL, 10000);
if (!singleid || cid.IsPartOf(*singleid, nullptr))
{
AutoAlloc<AtomArray> ar;
BaseContainer* bc = description->GetParameterI(DescLevel(10002), ar);
if (!bc)
{
return false;
} else {
bc->SetFloat(DESC_MIN, 8.0);
}
if (!description->SetParameter(cid, *bc, DescLevel(10000)))
return false;
}
flags |= DESCFLAGS_DESC_LOADED;
return SUPER::GetDDescription(node, description, flags);
}
Does somebody know how to fix this? How to not duplicate your sliders?
(For the people not reading my whole post: I've added my sliders inside my .res file, and I want to set the minimum value programmatically, so I can constrain it with other sliders)
Thanks for your help and time!!
Greetings,
Casimir Smets