Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > PYTHON Development
  New Posts New Posts
  FAQ FAQ  Forum Search

Link input data field in a custom dialog ?

Author
Message
  Topic Search Topic Search
Mayorc View Drop Down
Member
Member


Joined: 2016 Jul 26
Online Status: Offline
Posts: 4
Direct Link To This Post Topic: Link input data field in a custom dialog ?
    Posted: 2016 Jul 26 at 6:26pm
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 in the SDK but I couldn't find such type of field, that looks very useful since it supports drag and drop too.
Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1878
Direct Link To This Post Posted: 2016 Jul 27 at 5:41am
Hi Mayorc,

welcome to the Plugin Café forums Smile

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

Cheers,
Andreas
SDK Support Engineer
Back to Top
Whithers View Drop Down
Member
Member
Avatar

Joined: 2012 Jun 04
Location: United States
Online Status: Offline
Posts: 92
Direct Link To This Post Posted: 2016 Jul 27 at 8:59am

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).
Back to Top
Mayorc View Drop Down
Member
Member


Joined: 2016 Jul 26
Online Status: Offline
Posts: 4
Direct Link To This Post Posted: 2016 Jul 27 at 9:30am
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. Smile
Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1878
Direct Link To This Post Posted: 2016 Jul 27 at 9:36am
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.

Cheers,
Andreas
SDK Support Engineer
Back to Top

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.109 seconds.