<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Python: GetTags() returning non-existent tags]]></title><description><![CDATA[<p dir="auto">Why does op.GetTags() return a polygon tag and point tag even if there are not any on the object?</p>
<p dir="auto">[&lt;c4d.BaseTag object called Phong/Phong with ID 5612 at 1906901951872&gt;, &lt;c4d.PolygonTag object called  with ID 5604 at 1906901936256&gt;, &lt;c4d.PointTag object called  with ID 5600 at 1906901964288&gt;]</p>
]]></description><link>http://developers.maxon.net/forum/topic/15290/python-gettags-returning-non-existent-tags</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 00:53:39 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/15290.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 16 Dec 2023 21:41:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Python: GetTags() returning non-existent tags on Wed, 20 Dec 2023 12:56:18 GMT]]></title><description><![CDATA[<p dir="auto">thanks <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/i_mazlov">@<bdi>i_mazlov</bdi></a></p>
]]></description><link>http://developers.maxon.net/forum/post/73386</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73386</guid><dc:creator><![CDATA[.del]]></dc:creator><pubDate>Wed, 20 Dec 2023 12:56:18 GMT</pubDate></item><item><title><![CDATA[Reply to Python: GetTags() returning non-existent tags on Wed, 20 Dec 2023 12:02:31 GMT]]></title><description><![CDATA[<p dir="auto">Hi @del,</p>
<p dir="auto">KillTag() removes a single tag of the specified type, the first occurrence after the specified index.</p>
<p dir="auto">The hidden tags are just ordinary tags that can be affected by the KillTag() function. Generally your approach with keeping in mind these tags would work. However, I'd personally stick to some more robust way of handling this case, as there might be some other plugin that doesn't care about these hidden tags and would mess up the order you're relying on. I don't think you lose too much of efficiency here when using Remove() instead of KillTag().</p>
<p dir="auto">Cheers,<br />
Ilia</p>
]]></description><link>http://developers.maxon.net/forum/post/73377</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73377</guid><dc:creator><![CDATA[i_mazlov]]></dc:creator><pubDate>Wed, 20 Dec 2023 12:02:31 GMT</pubDate></item><item><title><![CDATA[Reply to Python: GetTags() returning non-existent tags on Tue, 19 Dec 2023 22:36:12 GMT]]></title><description><![CDATA[<p dir="auto">HI <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/i_mazlov">@<bdi>i_mazlov</bdi></a> - I have a script that cycles through polygon selection tags on an object and I'm inserting materials tags next to the associated polygon selection tag that it's matched to.</p>
<p dir="auto">As far as KIllTag() goes, sometimes I have multiple tags of the same type. I don't necessarily want to remove all of them so starting at a specific index to just remove the tag I wanted made sense. I don't mind using Remove(). It's just that KillTag() is right there in the sdk with all of the other tag related things so that's where I started. I also think that the definition of it made me think that it removed a single tag versus all of the tags of that type "Removes a tag from the object and free its resources."</p>
]]></description><link>http://developers.maxon.net/forum/post/73375</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73375</guid><dc:creator><![CDATA[.del]]></dc:creator><pubDate>Tue, 19 Dec 2023 22:36:12 GMT</pubDate></item><item><title><![CDATA[Reply to Python: GetTags() returning non-existent tags on Tue, 19 Dec 2023 09:27:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi @del ,</p>
<p dir="auto">No, the position of tag in the tags list doesn't sound to me as a reliable index in this case.</p>
<p dir="auto">What is the problem you're trying to solve here? Neither <a href="https://developers.maxon.net/docs/py/2024_0_0a/modules/c4d/C4DAtom/GeListNode/BaseList2D/BaseObject/index.html?highlight=maketag#BaseObject.MakeTag" target="_blank" rel="noopener noreferrer nofollow ugc">MakeTag()</a> nor <a href="https://developers.maxon.net/docs/py/2024_0_0a/modules/c4d/C4DAtom/GeListNode/BaseList2D/BaseObject/index.html?highlight=killtag#BaseObject.KillTag" target="_blank" rel="noopener noreferrer nofollow ugc">KillTag()</a> select the tag by its index.</p>
<p dir="auto">The <strong>nr</strong> argument in the KillTag() is the position where cinema starts searching for the tag of the provided type. In other words, there's presumably not much efficiency you're loosing without specifying this argument.</p>
<p dir="auto">If you like to remove some specific tag, I think it's easier for you to use <a href="https://developers.maxon.net/docs/py/2024_0_0a/modules/c4d/C4DAtom/GeListNode/index.html#GeListNode.Remove" target="_blank" rel="noopener noreferrer nofollow ugc">Remove()</a> function on the tag itself.</p>
<p dir="auto">Cheers,<br />
Ilia</p>
]]></description><link>http://developers.maxon.net/forum/post/73367</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73367</guid><dc:creator><![CDATA[i_mazlov]]></dc:creator><pubDate>Tue, 19 Dec 2023 09:27:04 GMT</pubDate></item><item><title><![CDATA[Reply to Python: GetTags() returning non-existent tags on Mon, 18 Dec 2023 23:37:28 GMT]]></title><description><![CDATA[<p dir="auto">Do these tags always occupy the same position?</p>
<p dir="auto">I'm trying things like MakeTag and KillTag that require an indexed position and having two invisible tags is kind of throwing things off. Right now I'm subtracting 2 from the position that I'm targeting but this feels ripe for a script error down the road.</p>
]]></description><link>http://developers.maxon.net/forum/post/73364</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73364</guid><dc:creator><![CDATA[.del]]></dc:creator><pubDate>Mon, 18 Dec 2023 23:37:28 GMT</pubDate></item><item><title><![CDATA[Reply to Python: GetTags() returning non-existent tags on Mon, 18 Dec 2023 12:39:58 GMT]]></title><description><![CDATA[<p dir="auto">Thank you. I'll have to remember  TAG_VISIBLE for future scripts.</p>
]]></description><link>http://developers.maxon.net/forum/post/73361</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73361</guid><dc:creator><![CDATA[.del]]></dc:creator><pubDate>Mon, 18 Dec 2023 12:39:58 GMT</pubDate></item><item><title><![CDATA[Reply to Python: GetTags() returning non-existent tags on Mon, 18 Dec 2023 12:11:54 GMT]]></title><description><![CDATA[<p dir="auto">Hi @del ,</p>
<p dir="auto">Yes, <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/baca">@<bdi>baca</bdi></a> is completely correct with the answer. I just wanted to add that you can filter these tags out for example by using the <a href="https://developers.maxon.net/docs/py/2024_0_0a/modules/c4d/C4DAtom/GeListNode/BaseList2D/index.html?highlight=getinfo#BaseList2D.GetInfo" target="_blank" rel="noopener noreferrer nofollow ugc">GetInfo()</a> function with the <a href="https://developers.maxon.net/docs/py/2024_0_0a/consts/TAG.html" target="_blank" rel="noopener noreferrer nofollow ugc">c4d.TAG_VISIBLE</a> flag as shown below.</p>
<p dir="auto">Cheers,<br />
Ilia</p>
<pre><code>import c4d
op: c4d.BaseObject | None  # The primary selected object in `doc`. Can be `None`.
def main() -&gt; None:
    tags: list[c4d.BaseTag] = op.GetTags()

    print("All tags:")
    for t in tags:
        print(t)
    
    print("All visible tags:")
    for t in tags:
        if t.GetInfo() &amp; c4d.TAG_VISIBLE:
            print(t)
if __name__ == '__main__':
    main()
</code></pre>
]]></description><link>http://developers.maxon.net/forum/post/73360</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73360</guid><dc:creator><![CDATA[i_mazlov]]></dc:creator><pubDate>Mon, 18 Dec 2023 12:11:54 GMT</pubDate></item><item><title><![CDATA[Reply to Python: GetTags() returning non-existent tags on Sun, 17 Dec 2023 14:13:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi @del ,</p>
<p dir="auto">Those are invisible tags.<br />
You don't need to work with them directly, and also you shouldn't delete these tags.</p>
<p dir="auto">Technically all points and polygons information contained in these tags.<br />
SplineObject has their own set of invisible tags.</p>
]]></description><link>http://developers.maxon.net/forum/post/73355</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/73355</guid><dc:creator><![CDATA[baca]]></dc:creator><pubDate>Sun, 17 Dec 2023 14:13:34 GMT</pubDate></item></channel></rss>