THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/09/2012 at 03:25, xxxxxxxx wrote:
C4D Ver. 13
Lang: python
Hi Everyone,
this is probably a noob question but I can't figure it out. I created some (very basic) scripts that simply add a c4d tag to an object. I made it for xpresso tag, target, and some other tags I use frequently, to have them docked in the interface. The code is this simple:
import c4d
from c4d import gui
#Welcome to the world of Python
def main() :
obj = doc.GetActiveObject()
if obj is None :
gui.MessageDialog('Nessun oggetto selezionato')
return
doc.StartUndo()
xtag = c4d.BaseTag(c4d.Texpresso)
obj.InsertTag(xtag)
c4d.EventAdd()
doc.AddUndo(c4d.UNDOTYPE_NEW, xtag)
doc.EndUndo()
if __name__=='__main__':
main()
The script by default has the generic python icon, is possible to have it assigned one of the standard C4D icons that represent the tag is going to be created ?
Thank for any advice !
Max