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 input data field in a custom dialog ?

    PYTHON Development
    0
    5
    544
    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 26/07/2016 at 18:26, xxxxxxxx wrote:

      Userdata has this kind of data field, this datafield supports:

      • Objects
      • Materials
      • ....

      Link data field

      It's easily recognizable since it has the arrow for selection.

      I think it should be possible since I saw this used in the Magic Replace plugin from NitroMan which is a Python plugin.

      Magic Replace

      So I wonder If I can create this for a script that creates a custom dialog, I gave a look under :
      [ **c4d.gui.GeDialog**](https://developers.maxon.net/docs/py/2023_2/modules/c4d.gui/GeDialog/index.html#) ** ** in the SDK but I couldn't find such type of field, that looks very useful since it supports drag and drop too.

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

        On 27/07/2016 at 05:41, xxxxxxxx wrote:

        Hi Mayorc,

        welcome to the Plugin Café forums 🙂

        The GUI element you are looking for is called LinkBoxGui. It's added via AddCustomGui().

        But please be careful, you can only do synchronous/modal dialogs within a Script Manager script. So drag and drop for example won't be possible. If you need asynchronous/non-modal dialogs you will be better of with your own CommandData plugin (which really isn't that much different from or any more complex than a script).

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

          On 27/07/2016 at 08:59, xxxxxxxx wrote:

          And the plugin examples are really helpful if you haven't made one before, since it is a lot to take in at once (at least for me).

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

            On 27/07/2016 at 09:30, xxxxxxxx wrote:

            So it must be compiled to get drag and drop, I wonder now if the Arrow (instead of d&d) would work though, but still think that in a modal window it could not work.

            Yeah I agree is alot all at once, I've already studied many of the script examples, I will sooner or later get a look on those plugins. 🙂

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

              On 27/07/2016 at 09:36, xxxxxxxx wrote:

              No, it must not be compiled to get drag and drop. But it needs to run in a context that allows for non-modal dialogs.
              Just take a look at the example plugins (in your case especially CommandData ones) Withers posted. It's really not a big deal to convert your script into a CommandData plugin, don't be scared.

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