<?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[How do I return a list of names and ids for a drop down menu?]]></title><description><![CDATA[<p dir="auto">I'm trying to automatically set a parameter on a shader. The parameter is a dropdown menu (combo box). The items in the drop down are dynamic so I can't just use a static number to set the parameter.</p>
<p dir="auto">I'm wondering if there's a way to read the names of the items and select the one I want based on the name?</p>
<p dir="auto">Something like:</p>
<pre><code>items = getComboBoxItems(c4d.SUBSTANCESHADER_CHANNEL)
for item in items:
    if "roughness" in item.name:
        SubstanceShader[c4d.SUBSTANCESHADER_CHANNEL] = item.id
</code></pre>
]]></description><link>http://developers.maxon.net/forum//topic/16352/how-do-i-return-a-list-of-names-and-ids-for-a-drop-down-menu</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 07:09:11 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum//topic/16352.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Nov 2025 13:30:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How do I return a list of names and ids for a drop down menu? on Sun, 16 Nov 2025 11:40:16 GMT]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/lionlion44">@<bdi>lionlion44</bdi></a>,</p>
<p dir="auto">yes, that is the correct answer. The subject comes up from time to time, <a href="https://developers.maxon.net/forum/topic/13866" target="_blank" rel="noopener noreferrer nofollow ugc">here is an answer of mine</a> which is about the very case of yours - discovering substance channels.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum//post/76941</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/76941</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Sun, 16 Nov 2025 11:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to How do I return a list of names and ids for a drop down menu? on Thu, 13 Nov 2025 13:48:29 GMT]]></title><description><![CDATA[<p dir="auto">found a solution:</p>
<pre><code>substance_shader = diffuse_shader.GetClone()
mat.InsertShader(substance_shader)
mat[c4d.OCT_MATERIAL_ROUGHNESS_LINK] = substance_shader

desc = substance_shader.GetDescription(c4d.DESCFLAGS_DESC_NONE)
parm_desc = desc.GetParameter(c4d.SUBSTANCESHADER_CHANNEL)
cycle = parm_desc[c4d.DESC_CYCLE]
for index, value  in cycle:
    if "roughness" in value.lower():
        substance_shader[c4d.SUBSTANCESHADER_CHANNEL] = index
        break
</code></pre>
]]></description><link>http://developers.maxon.net/forum//post/76932</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/76932</guid><dc:creator><![CDATA[lionlion44]]></dc:creator><pubDate>Thu, 13 Nov 2025 13:48:29 GMT</pubDate></item></channel></rss>