Problem adding module tags in Python
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/11/2010 at 07:25, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12
Platform: Windows ;
Language(s) : PYTHON ;---------
Hi guys.I know how to add the usual phong, protect, vertex tags etc like this :
doc = documents.GetActiveDocument()
obj = doc.GetActiveObject()
my_tag = c4d.BaseTag(c4d.Tphong)
obj.InsertTag(my_tag)But whenever I try to add any of the Character tags, like Tcaik, I get an error 'Tcaik is not defined'.
Same with hair tags etcSo my question is how can add tags belonging to the modules ?
Thanks.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/11/2010 at 20:21, xxxxxxxx wrote:
I got an answer, which I'm copying here, so that those who search for the same problem in future can find it.
Thanks to sebastien for providing the info :Hi, are you looking for the tag with the ID 1019561? You can define the ID manually in the code:
Tcaik = 1019561
tag = c4d.BaseTag(Tcaik)How I got the ID? I created the tag manually in C4D and dragged it into the Py console.
Calling IK.GetType() returned the ID of the tag which is 1019561.Cheers, Sebastian
This method should work for all tags not defined in c4d.Basetag, so hair tags etc too.