Getting/Setting Custom GUI elements



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

    On 30/03/2011 at 09:31, xxxxxxxx wrote:

    Even just a little confirmation if its working only for object and tag plugins or for dialog (menu command) plugins as well would be super sweet. Then I could stop putting time in it (and start looking for an alternative).

    As of now I have only seen object and tag based .pype plugins with a working link field and I know Python itself rather well (if I do say so myself). I went through the complete inheritance diagram and searched every nook and cranny.

    Hm, or maybe its only working with some form of drag data? In other languages and APIs it is often done like that.

    EDIT: I'm giving up for now. It's just not possible at the moment. Pity, the pick whip select would have made it far superior.



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

    On 31/03/2011 at 22:21, xxxxxxxx wrote:

    A couple things I have learned(and just made it back to here) :

    The CUSTOMGUI pluginids I think can be found in the coffeesymbols.h file. You should see stuff like

    CUSTOMGUI_LINKBOX=1009415,
    CUSTOMGUI_INLINE=300001044,

    Ok, so as for a working linkbox example: I can only provide based off of what I did with ResEdit.

    So like Rick said, because FindCustomGui doesn't exist, I have to manually create a linkbox.

    So first I had to flush the group containing the linkbox via ``GeDialog.LayoutFlushGroup().
    So I did the followiing:

    self.LayoutFlushGroup(10042)
          self.linkslot=self.AddCustomGui(9999, c4d.CUSTOMGUI_LINKBOX, "Shot Cam Slot", c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, 0, 0)
          self.LayoutChanged(10042)

    ``This gave me a variable that was c4d.gui.LinkBoxCustomGui. This gave me the ability to do this in my Command function:

    if id==10044:
              Cam=CreateShotCam()
              print "Cam is: " + str(Cam)
              self.linkslot.SetLink(Cam)

    Hope this helps.

    ``

    ``



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

    On 03/04/2011 at 14:12, xxxxxxxx wrote:

    Yes, this helps a lot. Thanks.

    I'm not there yet, but this is definately worth trying.


Log in to reply