<?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[Creating a Playblast script falling at the hurdle.]]></title><description><![CDATA[<p dir="auto">I am creating a playblast script where it will automate the render settings for the project file and playblast render settings. Code below.</p>
<pre><code>import c4d
from c4d import documents, plugins, storage, utils

doc[c4d.DOCUMENT_FPS] = 25 #set file fps

newRenderData = c4d.documents.RenderData()
newRenderData.SetName('Playblast')
doc.InsertRenderDataLast(newRenderData)
doc.SetActiveRenderData(newRenderData) #make it active
newRenderData.SetBit(8) #make it selected

render_data = documents.GetActiveDocument().GetActiveRenderData()
c4d.CallCommand(12161) # Render Settings
newRenderData[c4d.RDATA_RENDERENGINE] = 300001061 #create Viewport Renderer
c4d.EventAdd()
newRenderData[c4d.RDATA_XRES] = 1920 #width
newRenderData[c4d.RDATA_YRES] = 1080 #height
newRenderData[c4d.RDATA_FRAMERATE] = 25 #set render fps to 25
newRenderData[c4d.RDATA_FRAMESEQUENCE] = 2 #Frame range to "All Frames"
newRenderData[c4d.RDATA_FORMAT] = 1125 #MP4 format


newRenderData[c4d.RDATA_XRES_VIRTUAL] = 1920 #width
newRenderData[c4d.RDATA_YRES_VIRTUAL] = 1080 #height

c4d.EventAdd(c4d.EVENT_FORCEREDRAW)

if __name__=='__main__':
    main()
</code></pre>
<p dir="auto">I am getting the render settings to align and execute however it is not updating the UI. It need to look like this !<img src="/forum/assets/uploads/files/1737538879616-untitled-1.png" alt="Untitled-1.png" class=" img-fluid img-markdown" /> image url) Not this <img src="/forum/assets/uploads/files/1737538968984-annotation-2025-01-22-094235.jpg" alt="Annotation 2025-01-22 094235.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>http://developers.maxon.net/forum/topic/15945/creating-a-playblast-script-falling-at-the-hurdle</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Nov 2026 19:17:18 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/15945.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Jan 2025 09:44:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Creating a Playblast script falling at the hurdle. on Thu, 01 Oct 2026 10:41:22 GMT]]></title><description><![CDATA[<p dir="auto">Man this saved me so much time too. Thank you.</p>
]]></description><link>http://developers.maxon.net/forum/post/77357</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77357</guid><dc:creator><![CDATA[MCCGLC]]></dc:creator><pubDate>Thu, 01 Oct 2026 10:41:22 GMT</pubDate></item><item><title><![CDATA[Reply to Creating a Playblast script falling at the hurdle. on Wed, 22 Jan 2025 17:54:17 GMT]]></title><description><![CDATA[<p dir="auto">That is perfect, thank you for being through and concise, lifesaver.</p>
]]></description><link>http://developers.maxon.net/forum/post/75652</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/75652</guid><dc:creator><![CDATA[AG_Vivimagic]]></dc:creator><pubDate>Wed, 22 Jan 2025 17:54:17 GMT</pubDate></item><item><title><![CDATA[Reply to Creating a Playblast script falling at the hurdle. on Wed, 22 Jan 2025 11:17:15 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ag_vivimagic">@<bdi>AG_Vivimagic</bdi></a>,</p>
<p dir="auto">Welcome to the Maxon developers forum and its community, it is great to have you with us!</p>
<h4>Getting Started</h4>
<p dir="auto">Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.</p>
<ul>
<li><a href="/forum/topic/15242/">Forum Overview</a>: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.</li>
<li><a href="/forum/topic/15244/">Support Procedures</a>: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.</li>
<li><a href="/forum/topic/15243/">Forum Features</a>: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.</li>
</ul>
<p dir="auto">It is <strong>strongly</strong> recommended to read the first two topics carefully, especially the section <a href="/forum/topic/15244/">Support Procedures: Asking Questions</a>.</p>
<h4>About your First Question</h4>
<p dir="auto">First of all, your script strikes me as sourced from or at least written with the help of a chat bot. Please disclose when you use AI, otherwise we might refuse to help you. Please also have a look at <a href="/forum/topic/15244/">Support Procedures: Asking Questions</a>, <em>'I am getting the render settings to align and execute however it is not updating the UI. It need to look like this !'</em> is not a proper question.</p>
<p dir="auto">I am assuming that you want to have similar setup of video post effects in your render data, as if when you choose the Preview Hardware Renderer manually. To achieve that, you must manually curate the effects. You should also avoid using raw integer values when setting parameters, as this leads to confusing code and easily to errors. <code>newRenderData.SetBit(8) #make it selected</code> does for example not do what you think it does. The value 8 is <code>BIT_ENABLEPAINT</code>, but you probably mean here <code>BIT_ACTIVE</code> (2).</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
<h4>Result</h4>
<p dir="auto"><img src="/forum/assets/uploads/files/1737544326743-a0644cb2-627b-4f81-8205-799dcd76cd1c-image.png" alt="a0644cb2-627b-4f81-8205-799dcd76cd1c-image.png" class=" img-fluid img-markdown" /></p>
<h4>Code</h4>
<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.
    """
    # Set the document FPS.
    doc[c4d.DOCUMENT_FPS] = 25

    # Create a new render data instance with the values you wanted.
    rdata: c4d.documents.RenderData = c4d.documents.RenderData()
    rdata.SetName("Playblast")
    rdata[c4d.RDATA_RENDERENGINE] = c4d.RDATA_RENDERENGINE_PREVIEWHARDWARE
    rdata[c4d.RDATA_XRES_VIRTUAL] = 1920
    rdata[c4d.RDATA_YRES_VIRTUAL] = 1080
    rdata[c4d.RDATA_FRAMERATE] = 25 
    rdata[c4d.RDATA_FRAMESEQUENCE] = c4d.RDATA_FRAMESEQUENCE_ALLFRAMES
    rdata[c4d.RDATA_FORMAT] = c4d.FILTER_MOVIE

    # We must now curate the video post effects for this render data. This is probably a bit overkill,
    # we could also just delete all of them, since we know that the Preview Renderer only uses MBL which 
    # cannot be removed. But there could be a third party effect which supports the preview renderer 
    # and which is present by default, so we do it the proper way by checking each effect for being
    # compatible with the selected render engine.
    effect: c4d.documents.BaseVideoPost = rdata.GetFirstVideoPost()
    while effect:
        nxt: c4d.documents.BaseVideoPost = effect.GetNext()
        if not effect.RenderEngineCheck(c4d.RDATA_RENDERENGINE_PREVIEWHARDWARE):
            effect.Remove()
        effect = nxt

    # Add the native RDATA_RENDERENGINE_PREVIEWHARDWARE effect.
    previewEffect: c4d.documents.BaseVideoPost = c4d.documents.BaseVideoPost(
        c4d.RDATA_RENDERENGINE_PREVIEWHARDWARE)
    rdata.InsertVideoPostLast(previewEffect)

    # Insert the render data and do the other things you wanted to do.
    doc.InsertRenderDataLast(rdata)
    doc.SetActiveRenderData(rdata)
    rdata.SetBit(c4d.BIT_ACTIVE)
    c4d.CallCommand(12161)

if __name__ == '__main__':
    main()
</code></pre>
]]></description><link>http://developers.maxon.net/forum/post/75646</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/75646</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Wed, 22 Jan 2025 11:17:15 GMT</pubDate></item></channel></rss>