On 11/03/2013 at 08:40, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Windows ;
Language(s) : PYTHON ;
---------
User Information:
Cinema 4D Version: 13
Platform: Windows ;
Language(s) : PYTHON ;
---------
Hey Everyone,
I'm writing a plugin for cinema in python.
I'm trying to add a composite Tag to an object, but only in case it doesn't allready have one. In order to do that, i want to compare the Tag IDs:
tagID = 5637
if c4d.documents.GetActiveDocument().GetSelection()[0].GetTags()[0].GetGUID() != tagID:
hostObject.InsertTag(c4d.BaseTag(tagID))
It works up to GetGUID which is apparently not an attribute of c4d.BaseObject (same goes for GetID).
The only attributes i can find in the docs are
.GetObject()
.GetOrigin()
And they both give me the Object the tag belongs to (in this case a simple Cube)
And just out of curiosity: How come that if i call .GetObject , which gives me the cube and its memory adress, the memory adress changes with every call?
Thanks a lot,
Aurel