<?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 to export icons of asset]]></title><description><![CDATA[<p dir="auto">Hey community,</p>
<p dir="auto">I want to get icon of assets like Redshift Nodes or OM capsule(Axis Center). but I can't export or download them,  at least that's what  <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a>  said before. Do we have some way to get those icons?</p>
<p dir="auto">I want to match icons and asset ids, so I can use them in pipeline, but a bit outside the c4d system.</p>
<p dir="auto">Cheers~<br />
DunHou</p>
<pre><code class="language-python">import c4d
import maxon
import shutil

def GetAssetDescription(mid: maxon.Id = maxon.Id("net.maxon.pattern.node.twod.blur")) -&gt; maxon.AssetDescription:
    repository = maxon.AssetInterface.GetUserPrefsRepository()

    assetDescription = repository.FindLatestAsset(
        maxon.AssetTypes.File(), mid, maxon.Id(), maxon.ASSET_FIND_MODE.LATEST)
    if assetDescription is None:
        raise RuntimeError("Could not find the asset.")

    return assetDescription

def IterateAssetMetadata():
    assetDescription = GetAssetDescription()
    icon = maxon.AssetUtilitiesInterface.GetAssetIcon(assetDescription)
    print(icon.GetUrl())

if __name__ == "__main__":
    IterateAssetMetadata()
</code></pre>
]]></description><link>http://developers.maxon.net/forum/topic/16418/how-to-export-icons-of-asset</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 22:11:47 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/16418.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Jun 2026 10:59:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to export icons of asset on Mon, 08 Jun 2026 15:55:11 GMT]]></title><description><![CDATA[<p dir="auto">Hm, okay. So, the situation is, you have a Cinema app/plugin, but since you use a non-native GUI, you must bridge the gap to your GUI and Cinema native image data.</p>
<p dir="auto">Please understand that using external UI kits is out of scope of support. Not only because it is a third party library, and because we refuse support for them, but also because we generally do not like it when plugins use other UI tool kits than the native one.</p>
<p dir="auto">With that being said:</p>
<p dir="auto">The script I have shown you above would be at least a way to cache command icons. You would have to add a mechanism to avoid having to write all bitmaps to disk every time, and to delete unused ones, because as I explained above, not all commands are static.</p>
<p dir="auto">For assets I would have to check myself or see some actual code. My base assumption would be that at least bitmap icons of assets can be loaded via <code>BaseBitmap::Init</code> (or <code>InitWith</code> in Python), even when the asset uses an exotic URL such as <code>c4d://[relative:///icon]/5159</code>. Because Python binds to <code>BaseBitmap::Init</code> which expects a <code>cinema::Filename</code> as the first argument, which will be internally converted to a <code>maxon::Url</code> and the Maxon API should then just figure out what you mean with <code>c4d://[relative:///icon]/5159</code> and load the correct bitmap for you. In asset icons you might also encounter other exotic URL types such as <code>ramdisk</code> urls, zipped urls and more. But in all cases, at least in theory, the unpacking into a <code>BaseBitmap</code> should work from the Python API. For vector icons you will have to wait a bit.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
<p dir="auto">PS: I am also not sure if serializing to disk is the best way. In C++ it would be for sure not be faster to write everything to disk and then read it back, instead of just converting data in memory. In slow, slow, slow Python, it might actually be faster to write stuff to disk and load it back using the C++ backend, than copying data in Python in memory.</p>
<p dir="auto">I.e., I mean something <a href="https://github.com/Maxon-Computer/Cinema-4D-Cpp-API-Examples/blob/master/plugins/example.image/source/example_image_layers_area.cpp" target="_blank" rel="noopener noreferrer nofollow ugc">like this</a>. But I did it there in the other direction, our GUI wraps alien image data. And not an alien GUI wraps our image data.</p>
]]></description><link>http://developers.maxon.net/forum/post/77192</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77192</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Mon, 08 Jun 2026 15:55:11 GMT</pubDate></item><item><title><![CDATA[Reply to How to export icons of asset on Mon, 08 Jun 2026 15:32:04 GMT]]></title><description><![CDATA[<p dir="auto">Ha, If only in terms of usage, I hope to export capsule icons that can be dragged to OM, save to disk, which I can read through regular code, not just limited to C4D.</p>
<p dir="auto">For example, my custom menu plugin has a settings dialog that is not based on C4D SDK, but I want to UI/UX it closer to C4D, so I want to obtain icon data for drawing.</p>
<p dir="auto">I hope this makes sense for my purpose.</p>
<p dir="auto">Cheers~<br />
DunHou</p>
]]></description><link>http://developers.maxon.net/forum/post/77191</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77191</guid><dc:creator><![CDATA[Dunhou]]></dc:creator><pubDate>Mon, 08 Jun 2026 15:32:04 GMT</pubDate></item><item><title><![CDATA[Reply to How to export icons of asset on Mon, 08 Jun 2026 15:31:40 GMT]]></title><description><![CDATA[<p dir="auto">Hm,</p>
<p dir="auto">I still do not really understand what you want to do. I suppose you want to support assets dragged into palettes as I have done below with a texture? Because that is the only way how I can bring the terms "asset", "command", and "icon" into a meaningful context.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1780929634970-40b5df15-7d82-49a6-bb74-bdae7cf90549-image.png" alt="40b5df15-7d82-49a6-bb74-bdae7cf90549-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Most commands, as for example an explicitly implemented <code>CommandData</code> plugin or the  <code>CommandData</code> wrapper created by Cinema 4D for a  <code>NodeData</code> plugin such as <code>ObjectData</code> or <code>TagData</code> are static, i.e., their ID will never change.</p>
<p dir="auto">But Cinema 4D also creates commands dynamically. The Script Manger does this for example (exposde via <a href="https://developers.maxon.net/docs/py/2026_2_0/modules/c4d/index.html?highlight=script#c4d.GetDynamicScriptID" target="_blank" rel="noopener noreferrer nofollow ugc">c4d.GetDynamicScriptID</a>). This might be something you are aware of, and which might have let you to assume that the Asset Browser does the same. Which is unfortunately not the case. The Asset Browser is using a non-public mechanism to create "commands" in palettes which are not really commands. So, you cannot <code>CallCommand</code> them. This little script will walk all commands for you and dump their name, icon, and ID.</p>
<pre><code class="language-py">import c4d

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

def main() -&gt; None:
    """Called by Cinema 4D when the script is being executed.
    """
    command: c4d.plugins.BasePlugin
    for command in c4d.plugins.FilterPluginList(c4d.PLUGINTYPE_COMMAND, True):
        name: str = command.GetName()
        if not name:
            continue

        cid: int = command.GetID()
        icon: c4d.BaseBitmap | None = c4d.bitmaps.InitResourceBitmap(cid)
        if icon is None:
            print(f"Found command with name '{name}', id {cid}, and no icon.")
        else:
            print(f"Found command with name '{name}', id {cid}, and an icon {icon}.")


if __name__ == '__main__':
    main()
</code></pre>
<p dir="auto">This will contain:</p>
<ul>
<li>Natively implemented commands ("My Light Manger", "Move")</li>
<li>Command wrappers for <code>NodeData</code> plugins ("My Object", "Cube")</li>
<li>Command wrappers for scripts ("My Script", "untitled 2")</li>
</ul>
<p dir="auto">But it will not contain asset "commands" as the Asset Browser does not create real commands for the assets dragged into palettes but uses a non-public mechanism to trigger the assets when clicking on them. You can of course also export asset icons to some degree, but these are (a) not commands and (b) there are the hurdles in the way as expressed in my previous post.</p>
<p dir="auto">The command IDs discovered in this manner will also contain dynamically created commands such as the ones created by the Script Manager. So, using such a data source for a running instance of Cinema 4D is fine, but you cannot 'cache' such data as the command ID of the "unitled 2" script wrapper will change every time you restart Cinema 4D.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum/post/77190</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77190</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Mon, 08 Jun 2026 15:31:40 GMT</pubDate></item><item><title><![CDATA[Reply to How to export icons of asset on Mon, 08 Jun 2026 14:24:22 GMT]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a> ,</p>
<p dir="auto">This is also related to SVG to some extent. My ultimate goal is to export the required commands and corresponding icons for use in my menu plugin. As it is not a traditional C4D API, it needs to be saved as a local image/svg. I am not sure if this is feasible.</p>
<p dir="auto">Cheers~<br />
DunHou</p>
]]></description><link>http://developers.maxon.net/forum/post/77189</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77189</guid><dc:creator><![CDATA[Dunhou]]></dc:creator><pubDate>Mon, 08 Jun 2026 14:24:22 GMT</pubDate></item><item><title><![CDATA[Reply to How to export icons of asset on Mon, 08 Jun 2026 14:31:46 GMT]]></title><description><![CDATA[<p dir="auto">Hey,</p>
<p dir="auto">I am not quite sure I understand the question. In case this is related to your vector file request, let me preface this that internally my merge request for <code>BaseBitmap::InitWithVectorFile</code> is already  pending. There are some technical discussions still going on about details of the MR, but a feature like this will come in one form or another. I have implemented this in C++ and the ported it back to Python, so that both APIs have this feature. The feature is targeting the next non-hotfix release after the  next non-hotfix release (i.e., it will roughly arrive in Q3, and as an MRD you will have access to as soon as we start publishing tester builds for this release).</p>
<p dir="auto">regarding your question, I am not really sure what you are asking for. Let me try to clarify some things about icons in asset databases:</p>
<ul>
<li>Icons for assets can change dynamically, the <a href="https://developers.maxon.net/docs/cpp/2026_2_0/page_handbook_assetapi_implement_preset_asset_type.html" target="_blank" rel="noopener noreferrer nofollow ugc">Dots Preset Asset Example</a> I wrote a long time ago is a good example for this. So, caching icons can lead to stale icons.</li>
<li>Icons do not have to be necessarily expressed in an URL scheme that makes much sense without the Maxon API, e.g., you could encounter URLs such as <code>c4d://[relative:///icon]/5159</code>, which would be an asset that is referencing the Cinema API icon resource <code>5159</code>, i.e., <code>c4d.Ocube</code>.</li>
<li>Generally, the raw asset database file scheme, while somewhat human readable, is not meant to be parsed by external tools, and the format can change without much notice. The only way to reliably parse these files is to use the Cinema and Maxon API, which will abstract away from any file format changes.</li>
</ul>
<p dir="auto">So, if you want to parse asset database resources for icon data, you will need to have access to the Cinema and Maxon API. And even then, this can be very much non-trivial.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum/post/77185</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77185</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Mon, 08 Jun 2026 14:31:46 GMT</pubDate></item></channel></rss>