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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Link in GeDialog

    SDK Help
    0
    3
    277
    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
      Helper
      last edited by

      On 11/04/2013 at 07:55, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   13.061 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello,
      i have a some trouble with a LINK in a GeDialog.
      In my res file, it looks like this:
      ...
      LINK IDC_CUSTOM1
      {
      ALIGN_TOP; SCALE_H;
      }
      ..
       
      and I get the link in the message function of in the command function of GeDialog.
      ..
      case IDC_CUSTOM1:
      BaseList2D* m_blink = msg.GetLink( BFM_ACTION_VALUE, GetActiveDocument() );
      ...
       
      Now my problem, how can I set a link into this field? a SetLink() function for gadgets doesn't exist.
       
      regards
      Marky

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

        On 11/04/2013 at 08:21, xxxxxxxx wrote:

        Hi,

        You can get/set a link retrieving the custom GUI gadget with FindCustomGui() first:

        LinkBoxGui* linkbox = (LinkBoxGui* )FindCustomGui(IDC_LINK, CUSTOMGUI_LINKBOX);
        if (linkbox==NULL) return FALSE;
          
        BaseList2D bl = linkbox->GetLink(doc);
        ...
        linkbox->SetLink(bl);
        

        See LayerShaderBrowser in the SDK examples.
        This CommandData example uses a LINK in its dialog.

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

          On 11/04/2013 at 21:50, xxxxxxxx wrote:

          Oh, so easy. Thanks a lot, it's working.
          I have totally forgotten to look into the sdk examples.

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