<?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[Save All Materials]]></title><description><![CDATA[<p dir="auto"><em>On 22/08/2018 at 06:51, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Hi everyone,</p>
<p dir="auto">I'm trying to save all of the project materials into a .c4d file?<br />
This will be inside a CommandData plugin and unfortunately can't find a way of saving only the materials.</p>
<p dir="auto">Does anyone have a way of dealing with this?</p>
<p dir="auto">Thank you very much! <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":slightly_smiling_face:" alt="🙂" /></p>
]]></description><link>http://developers.maxon.net/forum/topic/10923/14379_save-all-materials</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 07:37:33 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/10923.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Sep 2018 10:57:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Save All Materials on Sat, 01 Sep 2018 10:57:32 GMT]]></title><description><![CDATA[<p dir="auto"><em>On 23/08/2018 at 07:57, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Hi Andreas,</p>
<p dir="auto">It was wrecking my brains and is actually quite simple! <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":slightly_smiling_face:" alt="🙂" /></p>
<p dir="auto">Thank you very much for that!</p>
]]></description><link>http://developers.maxon.net/forum/post/55465</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/55465</guid><dc:creator><![CDATA[Helper]]></dc:creator><pubDate>Sat, 01 Sep 2018 10:57:32 GMT</pubDate></item><item><title><![CDATA[Reply to Save All Materials on Sat, 01 Sep 2018 10:57:29 GMT]]></title><description><![CDATA[<p dir="auto"><em>On 23/08/2018 at 07:16, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Hi,</p>
<p dir="auto">the goal is a C4D scene file containing only the materials of a scene, right?</p>
<p dir="auto">The idea is to clone the needed materials into a new document, which then saved in the end.</p>
<p dir="auto">The simplest approach could look like so (although it reverses the material order) :</p>
<pre><code>    doc = c4d.documents.GetActiveDocument()
    newDoc = c4d.documents.BaseDocument()
    mat = doc.GetFirstMaterial()
    while mat is not None:
        newDoc.InsertMaterial(mat.GetClone(c4d.COPYFLAGS_0))
        mat = mat.GetNext()
    c4d.documents.SaveDocument(newDoc, 'C:/Users/Andreas/Desktop/test_all_materials.c4d', c4d.SAVEDOCUMENTFLAGS_0, c4d.FORMAT_C4DEXPORT)
</code></pre>
]]></description><link>http://developers.maxon.net/forum/post/55464</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/55464</guid><dc:creator><![CDATA[Helper]]></dc:creator><pubDate>Sat, 01 Sep 2018 10:57:29 GMT</pubDate></item></channel></rss>