<?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[Change render Space (Color Profile) - how?]]></title><description><![CDATA[<p dir="auto">Dear Dev Team,</p>
<p dir="auto">I have a plugin that renders (Standard C4d Renderer - fastest for plain color at the time) a flat color rendering (no dithering, shading, or lights) of object display color (yes plain object color, no textures). Input and output have to be the exact same color, to evaluate if the camera "sees" an object. This plugin worked before 2025.2 with "sRGB linear" workflow.<br />
Render output looks like this (the more objects the more colors of course):<br />
<img src="/forum/assets/uploads/files/1787667525100-example.png" alt="example.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Quick solution for me is to change the "Render space" to legacy "sRGB linear workflow"<br />
<img src="/forum/assets/uploads/files/1787667885462-2026-08-25-16_24_25-convert-render-space.png" alt="2026-08-25 16_24_25-Convert Render Space.png" class=" img-fluid img-markdown" /><br />
<strong>Question: -&gt; how would I do that in python ?</strong> (and back to the users render Color-space so it does not mess up the users settings)</p>
<p dir="auto"><em>Is there a better way to get Input object color and rendered color to be exactly the same with no color space change? A color transform on the bmp? how would I do that?</em></p>
<p dir="auto">thank you for your time</p>
]]></description><link>http://developers.maxon.net/forum/topic/16441/change-render-space-color-profile-how</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 03:21:22 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/16441.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Aug 2026 14:28:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Change render Space (Color Profile) - how? on Tue, 25 Aug 2026 16:46:07 GMT]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/mogh">@<bdi>mogh</bdi></a>,</p>
<p dir="auto">the answer can be found in the OCIO examples, specifically <a href="https://github.com/Maxon-Computer/Cinema-4D-Python-API-Examples/blob/c42aa9df730a4145ceaf351cf6139d3efa48d537/scripts/04_3d_concepts/open_color_io_2025_2.py#L232" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>. In the example I do the exact opposite from what you want to do, I convert a scene from legacy/basic mode to OCIO. Its inverse would look somewhat like what I show below. I hope this helps.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
<pre><code class="language-py">"""Demonstrates how to convert a document from OCIO color management to basic color management.
"""
import c4d


op: c4d.BaseObject | None # The primary selected object in the scene, can be None.
doc: c4d.documents.BaseDocument # The currently active document.

def main() -&gt; None:
    """Runs the example.
    """
    # The document is already in basic mode, so no conversion is needed.
    if doc[c4d.DOCUMENT_COLOR_MANAGEMENT] == c4d.DOCUMENT_COLOR_MANAGEMENT_BASIC:
        return c4d.gui.MessageDialog("The document is already in basic mode. No conversion is needed.")

    # Get the converter, and the active render space, which by default will be ACEScg.
    converter: c4d.modules.render.SceneColorConverter = c4d.modules.render.SceneColorConverter()
    renderSpace: str = doc.GetOcioRenderingColorSpaceNames()[0]

    # Initialize the converter with:
    #              doc, from-low   , from-high   , to
    converter.Init(doc, renderSpace, renderSpace, "scene-linear Rec.709-sRGB")

    # Convert everything in the document (we pass the document itself as the second argument). The
    # undo management is only needed so that our DOCUMENT_COLOR_MANAGEMENT below is reversible. The
    # ConvertObject call creates undo steps on its own with the default flag we pass. 
    doc.StartUndo()
    doc.AddUndo(c4d.UNDOTYPE_PRIVATE_DOCUMENTDATA, doc)
    if not converter.ConvertObject(doc, doc):
        print(f"Failed to color convert document '{doc}'.")

    # Finally, set the color management mode to basic/legacy. It is absolutely important that we do
    # things in this order, otherwise SceneColorConverter will not work correctly.
    doc[c4d.DOCUMENT_COLOR_MANAGEMENT] = c4d.DOCUMENT_COLOR_MANAGEMENT_BASIC
    doc.EndUndo()
    c4d.EventAdd()
    
if __name__ == "__main__":
    main()
</code></pre>
]]></description><link>http://developers.maxon.net/forum/post/77332</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77332</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Tue, 25 Aug 2026 16:46:07 GMT</pubDate></item></channel></rss>