On 06/01/2015 at 07:52, xxxxxxxx wrote:
Two questions regarding image in the UI.
1. Do I need to register every image I use in UI (I mean get it's IDs from pluginCafe)? As I am using only one image, can I use Plugins ID?
2. I am using this method of adding image. However, I feel like I am doing it wrong, as it looks like a button (gets highlighted once mouse over). What would be the correct way of adding image (not button) to the UI?
BITMAP_ID = 100001; buttonimage = c4d.bitmaps.BaseBitmap() #We need an instance of BaseBitmap class to use an image buttonimage.InitWith(os.path.join(dir, "res", "logo.png")) #The location where the button image exists gui.RegisterIcon(BITMAP_ID, buttonimage) bc = c4d.BaseContainer() bc.SetLong(c4d.BITMAPBUTTON_ICONID1, BITMAP_ID) self.AddCustomGui(200, c4d.CUSTOMGUI_BITMAPBUTTON, "Image", c4d.BFH_CENTER | c4d.BFV_CENTER, 100, 100, bc)