Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Register
    • Login

    NodeData-Plugin and BaseContainer?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 337 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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
          
          
          
          
           
          
          
          
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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()

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post