NodeData-Plugin and BaseContainer?

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

On 11/05/2005 at 13:11, xxxxxxxx wrote:

User Information:
Cinema 4D Version:    
Platform:      
Language(s) :

---------
Hello together,
 
I'm still quite stuck with getting the NodeData-Plugins to work the way I want.
 
In the register function of my NodeData-Plugin I also register a Description for it, so you can edit some values via the AM or a CUSTOMGUI_DESCRIPTION.
 
This works fine so far. But as I have understand from the SDK the NodeData-Plugin corresponds internally to a GeListNode. So, I don't have the GetData() and GetDataInstance() functions to retrieve the BaseContainer, since these are first introduced in BaseList2D.
 
So, I tried to get the value via the GetDescription()-function. But there I can only get atrributes about the Description-entry itself (like name, GUI-type) and not the value.
 
Well, Im sure the answer to this is quite simple, but right now I don't see the wood from the trees;-)
 
If someone could give me a hint or example I really would be happy.

Here some code snip:

    
    
    
    
    //Registration of the NodeData-Plugin  
    
    
    
    
    
    Bool Register_MyNodeData(void)  
    {  
    return RegisterDescription(ID_MYNODEDATA, "Desc_MyNodeData", NULL) &&   
    RegisterNodePlugin(ID_MYNODEDATA, "MyNodeData", 0, MyNodeData::Alloc, NULL, 0, NULL);
    
    
    
    
     
    
    
    
    
    }
    
    
    
    
     
    
    
    

And some way I was trying to get the values set in the GUI of the registered Description:

    
    
      
    node = AllocListNode(ID_MYNODEDATA);  
    this->am->SetObject(node); // show it in the CUSTOMGUI_DESCRIPTION  
    AutoAlloc<Description> desc;  
    node->GetDescription(desc,0);  
    BaseContainer *bc = desc->GetParameterI(DescLevel(ON_OFF_MODE), NULL);
    
    
    
    
     
    
    
    
    
    // But here I can't find a way to retrieve the value of the checkbox in this example
    
    
    
    
     
    
    
    

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

On 12/05/2005 at 03:47, xxxxxxxx wrote:

Hi

have you tried using the C4dAtom::GetParameter() function:

node = AllocListNode(ID_MYNODEDATA);
GeData d;
node->GetParameter(DescId(ON_OFF_MODE),d,0);
Bool b = d.GetBool()

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

On 12/05/2005 at 10:49, xxxxxxxx wrote:

Hello,
 
thanks, that worked;-)
 
I actually also tried this before. I used it in the Init()-Call and there it doesn't seem to work. But now I tried it at another part of the code and there it works just how it should.
 
 
Dani