Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi there,
I was going through the resource documentation (C++) and I discovered that there is a button resource called ARROWBUTTON (here the link).
I tried to used it on a .res for a TAG plugin written in Python, but I only get errors as soon as I'm writing ARROWBUTTON, either using it or using CUSTOMGUI parameter.
CONTAINER myTAGPLUGIN { NAME myTAGPLUGIN; GROUP { BUTTON BT_LEFT { CUSTOMGUI ARROWBUTTON; ARROW_LEFT; } } }
CONTAINER myTAGPLUGIN { NAME myTAGPLUGIN; GROUP { ARROWBUTTON BT_LEFT { ARROW_LEFT; } } }
Is there a way to get this to create a simple arrow button in a TAG plugin in Python, or this is a part of the SDK limitations?
Thanks,
Hello @mocoloco,
Thank you for reaching out to us. The gadget ARROWBUTTON is a dialog resource element. A TagData plugin is an instance of a NodeData plugin, implementing a description ressource. The two are not interchangable and you cannot place an ARROWBUTTON gadget in a description resource directly. The only way to do so, is to implement an iCustomGui where you can place the ARROWBUTTON, to later then use that custom GUI of yours in description resource of your node. Implementing custom GUIs is only possible with our C++ API.
ARROWBUTTON
TagData
NodeData
iCustomGui
You can also place a BITMAPBUTTON inside a description resource, but you are much more limited when it comes to the layout of the buttons compared to the same gadget in a dialog.
BITMAPBUTTON
Markup:
// The description defintion of the tag Tmmover. CONTAINER Tmmover { NAME Tmmover; INCLUDE Texpression; // The main "Tag" tab of the tag. GROUP ID_TAGPROPERTIES { // ... GROUP { COLUMNS 2; BITMAPBUTTON ID_BTN_BCK { ICONID1 12411; } BITMAPBUTTON ID_BTN_FWD { ICONID1 12412; } } } }
Result:
To learn more about resources, I would recommend these manuals.
Cheers, Ferdinand
Thanks a lot @ferdinand, I'm going to have a look on BITMAPBUTTON and see if that can make the trick or not
Cheers, Christophe
It does the trick, thanks a lot @ferdinand ! Cheers, Christophe
Great to hear! One thing I forgot to mention:
ICONID1
ICONID2
c4d.gui.RegisterIcon
RegisterXXXPlugin