<?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[Reading Immutable Selection Tags]]></title><description><![CDATA[<p dir="auto">How can I read data from Selection Tags created by SceneNodes modifiers like the Store Selection ?</p>
<p dir="auto">Seems like they don't work like the other  selection tags.</p>
]]></description><link>http://developers.maxon.net/forum/topic/16398/reading-immutable-selection-tags</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 15:35:41 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/16398.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Apr 2026 21:24:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Reading Immutable Selection Tags on Wed, 08 Apr 2026 08:43:48 GMT]]></title><description><![CDATA[<p dir="auto">Ah ! They are called Proxy Tags and I can see the actual tag with the MSG_GETREALTAGDATA ! Thank you <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/2764.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--heart" style="height:23px;width:auto;vertical-align:middle" title="❤" alt="❤" />️</p>
]]></description><link>http://developers.maxon.net/forum/post/77117</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77117</guid><dc:creator><![CDATA[Dimitris_Derm.]]></dc:creator><pubDate>Wed, 08 Apr 2026 08:43:48 GMT</pubDate></item><item><title><![CDATA[Reply to Reading Immutable Selection Tags on Tue, 07 Apr 2026 12:41:04 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/dimitris_derm.">@<bdi>Dimitris_Derm</bdi></a>. ,</p>
<p dir="auto">Thank you for reaching out to us. Please follow our <a href="https://developers.maxon.net/forum/topic/15244/" target="_blank" rel="noopener noreferrer nofollow ugc">Support Procedures</a>, especially regarding providing code and scene data alongside your questions. Because otherwise things can become a guessing game for us. It also often the case that things are more complicated than it seems, as the case here.</p>
<h3>About your Question</h3>
<p dir="auto">When you talk about <em>'selection tags'</em>, I assume from the context that you actually mean selection proxy tags (denoted by the little link overlay icon). E.g., as here generated by the extrude object.<br />
<img src="/forum/assets/uploads/files/1775563569125-13749476-8f97-400c-af06-411186aaad78-image.png" alt="13749476-8f97-400c-af06-411186aaad78-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><a href="https://developers.maxon.net/docs/cpp/2026_1_0/group___tag_types.html#ga3ae4dca045ccfe44654b4c59d8c5b86b" target="_blank" rel="noopener noreferrer nofollow ugc">Proxy selection tags</a> exist because selection tags need a point object to work, when a selection tag sits on a <a href="https://github.com/Maxon-Computer/Cinema-4D-Python-API-Examples/tree/master/scripts/04_3d_concepts/modeling/geometry" target="_blank" rel="noopener noreferrer nofollow ugc">generator</a>, it becomes ambiguous to which point object inside the cache of the generator they belong. Proxies solve this by pointing to one or many actual selection tags in a cache (it is often the case that a proxy tag does not resolve to a singular discrete tag in the cache but to multiple tags).</p>
<p dir="auto">The proxy tag type class/interface is private as declared in the C++ API, i.e., one cannot interact directly with them (as a third party). But one can send <code>MSG_GETREALTAGDATA</code> to find the discrete tag(s) it points to.</p>
<blockquote>
<p dir="auto"><img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title=":warning:" alt="⚠" /> The data returned by <code>MSG_GETREALTAGDATA</code> is by design data in caches. You can read data in caches, but you should never attempt to write data in caches, as caches are static by design, and violating this rule can lead to crashes.</p>
</blockquote>
<blockquote>
<p dir="auto"><img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title=":warning:" alt="⚠" /> What makes this more complicated in this case is that you use Neutron (Scene Nodes) which adds another layer of complexity. We would need here your existing code and a concrete scene to give an answer, as the approach shown below will likely not work there.</p>
</blockquote>
<p dir="auto">Cheers,<br />
Ferdinand</p>
<h3>Result</h3>
<p dir="auto">An extrude object which holds a proxy selection tag. In the console we can see the partial scene graph for the object. I have highlighted the line which is the actual selection tag inside the cache of the extrude object the proxy points to.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1775564374332-ec1e1feb-d525-49c5-a800-4668aeb9abd4-image-resized.png" alt="ec1e1feb-d525-49c5-a800-4668aeb9abd4-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">My scene: <a href="/forum/assets/uploads/files/1775565660963-extrude.c4d">extrude.c4d</a></p>
<h3>Code</h3>
<pre><code class="language-py">"""Demonstrates how to find the discrete selection tags which are pointed to by a selection proxy tag 
on a generator.
"""

import c4d
import mxutils

doc: c4d.documents.BaseDocument  # The currently active document.
op: c4d.BaseObject | None  # The primary selected object in `doc`. Can be `None`.

# The types of proxy tags which we want to find on the selected object.
PROXY_TAG_TYPES: tuple[int, ...] = (
    c4d.Tcacheproxytagpointselection,
    c4d.Tcacheproxytagedgeselection,
    c4d.Tcacheproxytagpolyselection
)

def main() -&gt; None:
    """Called by Cinema 4D when the script is being executed.
    """
    if op is None:
        return c4d.gui.MessageDialog('Please select an object.')
    
    # The proxy tags of #op. Proxy tags exist because selections (and some caches) only work directly
    # on a point object. A selection tag on a generator can be ambiguous, because it might not be 
    # clear which of the multiple point objects in the cache of the generator it should be applied 
    # to. Proxy tags solve this problem, as they point to one or multiple discrete selection tags 
    # in the cache of a generator, which should be used in place of the proxy.
    proxyTags: list[c4d.BaseTag] = [t for t in op.GetTags() if t.GetType() in PROXY_TAG_TYPES]
    if not proxyTags:
        return c4d.gui.MessageDialog('The selected object has no proxy tags.')
    
    # Print the partial scene graph of #op, so that we can see what is going on in the cache tree 
    # of it.We should see there the discrete selection tag(s) which are pointed to by the proxy tags 
    # of #op.
    print(mxutils.GetSceneGraphString(op))
    print("\n", "-" * 80, "\n")

    # Iterate over all proxy tags and find the discrete selection tags they point to, using the 
    # message c4d.MSG_GETREALTAGDATA. The result of this message is a dictionary, which contains 
    # references to the discrete selection tags in the cache of the generator, which are pointed 
    # to by the proxy tag.
    for proxyTag in proxyTags:
        res: dict = {}
        proxyTag.Message(c4d.MSG_GETREALTAGDATA, res)
        tagSymbol: str = mxutils.g_c4d_symbol_translation_cache.Get(proxyTag.GetType())[0]
        print(f"{proxyTag.GetName()}({tagSymbol}) points to: {res}")

    # NEVER modify the returned tags, as caches are by design static (but that is not physically 
    # enforced by Cinema 4D). Changing the content of caches can very easily lead to crashes, unless
    # you know exactly what you are doing. Reading data from caches is perfectly fine, though.

if __name__ == '__main__':
    main()

</code></pre>
]]></description><link>http://developers.maxon.net/forum/post/77108</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77108</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Tue, 07 Apr 2026 12:41:04 GMT</pubDate></item></channel></rss>