Hello,
I'm searching how can I dynamically colorize plugin icon like as the default C4D lights objects. I want to dynamically apply a color tint filter on my plugin object icon.
def Message(self, node, type, data):
if type == c4d.MSG_GETCUSTOMICON:
color = node[c4d.MYOBJECT_COLOR]:
icon = c4d.bitmaps.InitResourceBitmap(PLUGIN_ID)
"""width = icon.GetBw()
height = icon.GetBh()
for y in xrange(height) :
for x in xrange(width) :
r,g,b = icon.GetPixel(x, y)
#icon.SetPixel(x, y, r, g, b)"""
data['bmp'] = icon
data["w"] = icon.GetBw()
data["h"] = icon.GetBh()
data['filled'] = True
Thanks.