On 25/05/2014 at 03:52, xxxxxxxx wrote:
I have a tag plugin and assign that tag plugin to an object.
In the init part of the tag plugin I am using op = node.GetObject() to get the attached object of the tag
Except, I always get None?
class RESBUT(plugins.TagData) :
def Init(self, node) :
op = node.GetObject()
print "Init, node, op: ", node, op
return True
def Execute(self, tag, doc, op, bt, priority, flags) :
return True
if __name__ == "__main__":
bmp = bitmaps.BaseBitmap()
dir, file = os.path.split(__file__)
bitmapfile = os.path.join(dir, "res", "Icon.tif")
#print bitmapfile
result = bmp.InitWith(bitmapfile)
if not result:
print "Error loading bitmap!"
plugins.RegisterTagPlugin(id=PLUGIN_ID, str="Explosion v02", info=c4d.TAG_VISIBLE, g=RESBUT, description="resbut", icon=bmp)