THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/10/2011 at 14:30, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) :
---------
I think there is a mistake in the example given for using icons on the c4d.bitmaps page.
It reads:
icon=bitmaps.IconResourceBitmap(c4d.RESOURCEIMAGE_MOVE)
Which results in the error: 'module' object has no attribute 'IconResourceBitmap'
I believe it's supposed to be:
icon = bitmaps.InitResourceBitmap(c4d.RESOURCEIMAGE_MOVE)
Even after this is fixed. The example given still does not work as expected.
Simple R12 example:
def CreateLayout(self) :
self.SetTitle("My Python Dialog")
self.GroupBegin(999, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT)
icon = bitmaps.InitResourceBitmap(c4d.RESOURCEIMAGE_MOVE)
self.AddComboBox(1002, c4d.BFH_RIGHT)
self.AddChild(1002, 0, icon) #<---Does not load the icon..It loads the string c4d.bitmaps.BaseBitmap object at 0x0FC040E0>!!!
self.AddChild(1002, 1, "second option")
self.GroupEnd()
return True
-ScottA