On 03/05/2017 at 07:18, xxxxxxxx wrote:
Hello!
Thank you, Adam!
Sadly only now i read your answer, Yannick, after trying half a day ;)
My attempt was:
def Message(self, node, type, data) :
if type==c4d.MSG_DESCRIPTION_GETBITMAP:
if data['id'][0].id==c4d.ID_BITMAP:
dir, file = os.path.split(__file__)
path = os.path.join(dir, "res", "test.tif")
bm = bitmaps.BaseBitmap()
bm.InitWith(path)
data['bmp'] = bm
return True
return False
def GetDParameter(self, node, id, flags) :
if id[0].id == c4d.ID_BITMAP:
#BitmapButtonStruct bbs = BitmapButtonStruct(static_cast<PluginObject*>(node), id, dirty);
#t_data = GeData(CUSTOMDATATYPE_BITMAPBUTTON, bbs);
bbs = c4d.BitmapButtonStruct(node, id, 0)
return (True, bbs, flags | c4d.DESCFLAGS_DESC_LOADED)
return False
def SetDParameter(self, node, id, t_data, flags) :
if id[0].id == c4d.ID_BITMAP:
flags = flags | c4d.DESCFLAGS_DESC_LOADED
return True
But data in Message was always None...
Nevertheless thank you for your help :)
Cheers,
Mark.