<?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[Cinema4D 2025 get user data value parameter not accessible?]]></title><description><![CDATA[<p dir="auto">It seems that triggering this logic in Cinema4D 2025 fails:</p>
<pre><code class="language-python">    for description_id, base_container in obj.GetUserDataContainer():
        key = base_container[c4d.DESC_NAME]
        value = obj[description_id]
</code></pre>
<p dir="auto">Which did not error in Cinema4D 2023 and 2024.<br />
With an error along the lines of:</p>
<pre><code>    value = obj[description_id]
            ~~~^^^^^^^^^^^^^^^^
AttributeError: Parameter value not accessible (object unknown in Python)
</code></pre>
<p dir="auto"><a href="https://github.com/ynput/ayon-cinema4d/issues/23" target="_blank" rel="noopener noreferrer nofollow ugc">Source issue reported here</a><br />
Even though this same logic worked in Cinema4D 2023 and 2024.<br />
Is this a regression, or does my code need updating?</p>
<p dir="auto">Could it be failing on trying to get a value from a Group, e.g. as one created <a href="https://github.com/ynput/ayon-cinema4d/blob/0abfd676f2553682a0838d4c32b13c31206eb511/client/ayon_cinema4d/api/lib.py#L186-L192" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>:</p>
<pre><code class="language-python">            # Create the group
            group_bc = c4d.GetCustomDatatypeDefault(c4d.DTYPE_GROUP)
            group_bc[c4d.DESC_NAME] = group
            group_bc[c4d.DESC_SHORT_NAME] = group
            group_bc[c4d.DESC_TITLEBAR] = True
            group_bc[c4d.DESC_GUIOPEN] = False
            group_id = node.AddUserData(group_bc)
</code></pre>
<p dir="auto">If so, how would I detect correctly which user data should be allowed to retrieve the values from?</p>
]]></description><link>http://developers.maxon.net/forum/topic/15947/cinema4d-2025-get-user-data-value-parameter-not-accessible</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 18:22:06 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/15947.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Jan 2025 15:08:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cinema4D 2025 get user data value parameter not accessible? on Thu, 23 Jan 2025 08:55:28 GMT]]></title><description><![CDATA[<p dir="auto">Good to hear!</p>
]]></description><link>http://developers.maxon.net/forum/post/75656</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/75656</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Thu, 23 Jan 2025 08:55:28 GMT</pubDate></item><item><title><![CDATA[Reply to Cinema4D 2025 get user data value parameter not accessible? on Wed, 22 Jan 2025 22:47:43 GMT]]></title><description><![CDATA[<p dir="auto">Just to confirm - skipping the unwanted entries worked absolutely fine for my needs. And I was able to reproduce the behavior in Cinema4D 2023 too if I created such user data manually and tried to access it. So - no bug or regression, just my limited knowledge.</p>
]]></description><link>http://developers.maxon.net/forum/post/75653</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/75653</guid><dc:creator><![CDATA[BigRoy]]></dc:creator><pubDate>Wed, 22 Jan 2025 22:47:43 GMT</pubDate></item><item><title><![CDATA[Reply to Cinema4D 2025 get user data value parameter not accessible? on Wed, 22 Jan 2025 17:31:47 GMT]]></title><description><![CDATA[<p dir="auto">Thanks so much - of course, it may very well be that something in Cinema4D may just be generating more user data than I expected to live there. As such, I'll just perfectly ignore any values that couldn't be parsed since in my case I only care about those that I put there from Python to begin with.</p>
<p dir="auto">Thanks for the quick and thorough reply.</p>
]]></description><link>http://developers.maxon.net/forum/post/75651</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/75651</guid><dc:creator><![CDATA[BigRoy]]></dc:creator><pubDate>Wed, 22 Jan 2025 17:31:47 GMT</pubDate></item><item><title><![CDATA[Reply to Cinema4D 2025 get user data value parameter not accessible? on Wed, 22 Jan 2025 16:25:41 GMT]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/bigroy">@<bdi>BigRoy</bdi></a>,</p>
<p dir="auto">Thank you for reaching out to us. What Python is trying to tell you, is that the data type at this parameter is not wrapped for the Python API. Not every data type known to the Cinema 4D API, and there are probably hundreds when you count plugins, is exposed to Python.</p>
<p dir="auto">The data types in the core Cinema API (i.e., things in what the Python API calls <code>c4d</code>) are mostly wrapped for Python (but there are also exceptions as for example <a href="https://developers.maxon.net/docs/cpp/2025_1_0/classcinema_1_1_item_tree_data.html#a0c9d8d251e0444815f3991034de5c0e2" target="_blank" rel="noopener noreferrer nofollow ugc">ItemTreeData</a> where the Python API has no clue what to do with such paramater). Redshift is for example a prime offender and has introduced many data types which are inaccessible in Python (at least as a whole).</p>
<p dir="auto">What you can however often do, when the author of the data type implemented it, is channel access. See <a href="https://developers.maxon.net/forum/topic/14067/importing-rsproxies-using-python" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> and <a href="https://developers.maxon.net/forum/topic/13784/attribute-error-when-accessing-redshift-parameters" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> for examples. Since you do not show us what <code>description_id</code> is, I can only speculate here. My guess would be something from the "lower" section of the user data, as these types are all not wrapped (usually):</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1737561394336-d231792a-0098-406a-b502-192e32481efe-image.png" alt="d231792a-0098-406a-b502-192e32481efe-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I doubt that this is a regression, as this error is an intended feature of our API. It is more likely that you are now iterating over different user data than you did in 2023 and 2024. When you think differently, you would have to provide us a bit more information, specifically the data type and the scene file in which you are trying to iterate on some user data. I.e., just print out your <code>description_id</code> as this is a DescID, which will also contain type information.</p>
<p dir="auto">E.g.,</p>
<pre><code>for descid, _ in op.GetUserDataContainer():
   # You could also use C4Datom.GetParameter as this is a bit more elegant and does not need a try/catch:
   try:
      value = obj[descid]
   except:
      # Will print something like ((700, 5, 0), (1, 19, 0)) where the second triple is the actual parameter
      # (desc-level) and a desc level is composed as (ID, TYPE, CREATOR). I.e., the data type would be
      # 19 here, which is the value of `DTYPE_REAL`, i.e., a float parameter. When the data type integer
      # is a value in the millions, e.g., (1, 1234567, 0)), this is plugin data type from a third party. These
      # data types cannot be wrapped in Python (only component access works).
      print (descid) 
</code></pre>
<p dir="auto">So, long story short: The error is an intended feature. And when there would be a regression (which strikes me as quite unlikely), your code was always dagerous, as it assumes that you can read all parameter data types in Python (which you cannot). For details we would need the data type of the failing parameter and a scene file (when it is one of the native data types which are wrapped).</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum/post/75650</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/75650</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Wed, 22 Jan 2025 16:25:41 GMT</pubDate></item></channel></rss>