SOLVED R20 and R24 Description Differences

Hello! I have a plugin that I compiled for R20 and R24 and I'm noticing a difference between the two of them.

Here is my plugin in R20:
alt text

And here is in R24:
alt text

In R20 the description is redrawn as the cube is dragged over. In R24 it isn't redrawn despite GetDDescription being called.

Here is my code, which is the same for each version, but they're behaving differently.

Bool ShortTest::GetDDescription(GeListNode *node,  Description *description,  DESCFLAGS_DESC &flags)
{
  
    if (!description->LoadDescription(node->GetType()))
    {
       
    }
    BaseObject* op = static_cast<BaseObject*>(node);
    if (op == nullptr)
    {
        return FALSE;
    }

    const DescID *singleid = description->GetSingleDescID();
    
    
    DescID cid;
    BaseContainer* datainstance = op->GetDataInstance();
    
  
    DescID DescGroup = DescLevel(2000,  DTYPE_GROUP,  0);
    
    Int32 idShowNothing = 1;
    Int32 idShowEverything = 2;
    Int32 idMode = 10001;
    if (!singleid || DescGroup.IsPartOf(*singleid,  NULL))
    {
        BaseContainer bc;
        bc = GetCustomDataTypeDefault(DTYPE_GROUP);
        bc.SetString(DESC_NAME,  "Object"_s);
        
        
        bc.SetInt32(DESC_COLUMNS,  1);
        bc.SetFloat(DESC_DEFAULT,  1);
        bc.SetBool(DESC_SCALEH,  TRUE);
        bc.SetBool(DESC_DEFAULT,  TRUE);
        
        if (!description->SetParameter(DescGroup,  bc,  DescLevel(1057950)))
        {
            return TRUE;
        }
    }
    
    cid = DescLevel(idMode, DTYPE_LONG, 0);
    if (!singleid || cid.IsPartOf(*singleid, NULL))
    {
        
        
        BaseContainer bc;
        bc = GetCustomDataTypeDefault(DTYPE_LONG);
        bc.SetBool(DESC_FORBID_SCALING, TRUE);
        bc.SetBool(DESC_FORBID_INLINE_FOLDING, FALSE);
        bc.SetBool(DESC_GUIOPEN, TRUE);
        bc.SetString(DESC_NAME, "Test                                   "_s);
        BaseContainer MeasureDivisionNames;
        //  if (ModifiersNames == emptyBC) return TRUE;
        
        MeasureDivisionNames.SetString(idShowNothing, "Show Nothing"_s);
        MeasureDivisionNames.SetString(idShowEverything, "Show Parameters"_s);
        
        bc.SetInt32(DESC_CUSTOMGUI, ID_QUICKTABSRADIO_GADGET);
        bc.SetContainer(DESC_CYCLE, MeasureDivisionNames);
        if (!description->SetParameter(cid, bc, DescGroup))
            return TRUE;
    }
    
    if(datainstance->GetInt32(idMode) == idShowEverything)
    {
        
        cid = DescLevel(2002,  DTYPE_REAL,  0);
        if (!singleid || cid.IsPartOf(*singleid,  NULL))
        {
            BaseContainer bc;
            bc = GetCustomDataTypeDefault(DTYPE_REAL);
            bc.SetInt32(DESC_UNIT,FORMAT_DEGREE);
            bc.SetBool(DESC_FORBID_SCALING,  TRUE);
            bc.SetBool(DESC_FORBID_INLINE_FOLDING,  FALSE);
            bc.SetString(DESC_NAME,  "Test 1"_s);
            BaseContainer MeasureDivisionNames;
            
            
            if (!description->SetParameter(cid,  bc,  DescGroup))
                return TRUE;
        }
        cid = DescLevel(2003,  DTYPE_VECTOR,  0);
        if (!singleid || cid.IsPartOf(*singleid,  NULL))
        {
            BaseContainer bc;
            bc = GetCustomDataTypeDefault(DTYPE_VECTOR);
            bc.SetBool(DESC_FORBID_SCALING,  TRUE);
            bc.SetBool(DESC_FORBID_INLINE_FOLDING,  FALSE);
            bc.SetString(DESC_NAME,  "Test 2"_s);
            BaseContainer MeasureDivisionNames;
            
            
            if (!description->SetParameter(cid,  bc,  DescGroup))
                return TRUE;
        }
        cid = DescLevel(2004,  DTYPE_BOOL,  0);
        if (!singleid || cid.IsPartOf(*singleid,  NULL))
        {
            BaseContainer bc;
            bc = GetCustomDataTypeDefault(DTYPE_BOOL);
            bc.SetBool(DESC_FORBID_SCALING,  TRUE);
            bc.SetBool(DESC_FORBID_INLINE_FOLDING,  FALSE);
            bc.SetString(DESC_NAME,  "Test 3"_s);
            BaseContainer MeasureDivisionNames;
            
            
            if (!description->SetParameter(cid,  bc,  DescGroup))
                return TRUE;
        }
        
        cid = DescLevel(2005,  DTYPE_BOOL,  0);
        if (!singleid || cid.IsPartOf(*singleid,  NULL))
        {
            BaseContainer bc;
            bc = GetCustomDataTypeDefault(DTYPE_BOOL);
            bc.SetBool(DESC_FORBID_SCALING,  TRUE);
            bc.SetBool(DESC_FORBID_INLINE_FOLDING,  FALSE);
            bc.SetString(DESC_NAME,  "Test 4"_s);
            BaseContainer MeasureDivisionNames;
            
            
            if (!description->SetParameter(cid,  bc,  DescGroup))
                return TRUE;
        }
        cid = DescLevel(2006,  DTYPE_BOOL,  0);
        if (!singleid || cid.IsPartOf(*singleid,  NULL))
        {
            BaseContainer bc;
            bc = GetCustomDataTypeDefault(DTYPE_BOOL);
            bc.SetBool(DESC_FORBID_SCALING,  TRUE);
            bc.SetBool(DESC_FORBID_INLINE_FOLDING,  FALSE);
            bc.SetString(DESC_NAME,  "Test 5"_s);
            BaseContainer MeasureDivisionNames;
            
            
            if (!description->SetParameter(cid,  bc,  DescGroup))
                return TRUE;
        }
        
    
    }
    flags |= DESCFLAGS_DESC::LOADED| DESCFLAGS_DESC::RECURSIONLOCK;
    
    return SUPER::GetDDescription(node,  description,  flags);
}

Any idea why there is the difference between versions of Cinema?

Thanks, Dan

Thanks for the report, I did hive a try and I can indeed reproduce the issue, I will reach development team to see if this is intended (optimization) or a bug.

Cheers,
Maxime.

EDIT: Just chatted with a developer and he confirmed this looks like a bug, this will be investigated and I opened a bug report. Unfortually for the moment no workaround is found. So we consider this topic as closed, and I will updated you when the bugfix will be integrated in a public version (don't know when this will happen).

Hi would it be possible to share you resource file?
Do you override the Message method?

I saw that you use the flag DESCFLAGS_DESC::RECURSIONLOCK is there any reason for that? This prevent further evaluation and may cause the issue.

One things, you can also upload GIF up to 4mb directly in the forum (just drag and drop it).

Cheers,
Maxime.

@m_adam Hi Maxime, super sorry about the slow reply.

you can also upload GIF up to 4mb directly in the forum (just drag and drop it).

I'll keep this in mind in the future!

Do you override the Message method?

I was when I posted the test, but I removed it and nothing changed.

I saw that you use the flag DESCFLAGS_DESC::RECURSIONLOCK is there any reason for that? This prevent further evaluation and may cause the issue.

I shouldn't have been including this, but the issue still exists when I remedied the situation.

would it be possible to share you resource file?

My resource file is actually not doing anything in this case. I think there actually isn't one.

That all being said, it still works in R20 and doesn't in R24. Is there anything else I can test to help out?

Dan

Hello, I don't want to be pushy or bothersome. Just checking in to see if there is anything else I can provide or that I should look into. I know I initially responded late so I wouldn't blame anyone for this post being forgotten about.

Dan

Hello @d_schmidt,

please excuse the delay. @m_adam, my co-worker who handles your topic is currently on vaccation. He will be back on Monday the 16th, I'll left a sticky note on his (virtual) desk, so that he sees your question. I would however suggest that you follow up @m_adam request of sharing your description resource, unless you have already done this via E-mail with me being aware of it. Otherwise it is likely that Maxime will just ask for that again on Monday.

Thank you for your understanding,
Ferdinand

Hi @ferdinand,

No worry on any delay. I did some addition checking with the description resource and I even completely removed the resource folder but I'm having the same thing happen, so that doesn't seem to be playing a part as far as I can tell.

Dan

Thanks for the report, I did hive a try and I can indeed reproduce the issue, I will reach development team to see if this is intended (optimization) or a bug.

Cheers,
Maxime.

EDIT: Just chatted with a developer and he confirmed this looks like a bug, this will be investigated and I opened a bug report. Unfortually for the moment no workaround is found. So we consider this topic as closed, and I will updated you when the bugfix will be integrated in a public version (don't know when this will happen).

@m_adam Hi!

Thanks for looking into it!