<?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[Issue with Python MultiProcessing in 24]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">There seems t be a conflict between Python multiprocessing and Cinema 4D S24.</p>
<p dir="auto">If I enter into the console:</p>
<pre><code>import multiprocessing
MYVAR = multiprocessing.Array("c", 2000)
</code></pre>
<p dir="auto">then a new instance of Cinema 4D is launched.</p>
<p dir="auto">This means that if I have the above line in a plugin, new instances of Cinema 4D are launched recursively.</p>
<p dir="auto">This behavior is not present in Cinema 4D versions before S24. Perhaps it's a Python3.9 issue.</p>
<p dir="auto">C4D Release S24<br />
Operating System Apple MacOS &gt; OS X 11<br />
Operating System Version # 11.4</p>
<p dir="auto">Looking forward to your thoughts..</p>
]]></description><link>http://developers.maxon.net/forum/topic/13466/issue-with-python-multiprocessing-in-24</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 20:46:28 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/13466.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 Jul 2021 14:25:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Issue with Python MultiProcessing in 24 on Thu, 26 Aug 2021 10:20:48 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/conductor">@<bdi>conductor</bdi></a>,</p>
<p dir="auto">without further questions or replies, we will consider this topic as solved by Monday, the 30th and flag it accordingly.</p>
<p dir="auto">Thank you for your understanding,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum/post/67514</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/67514</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Thu, 26 Aug 2021 10:20:48 GMT</pubDate></item><item><title><![CDATA[Reply to Issue with Python MultiProcessing in 24 on Thu, 15 Jul 2021 08:27:20 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/conductor">@<bdi>conductor</bdi></a>, welcome in plugincafe <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=":)" alt="🙂" /></p>
<p dir="auto">Unfortually I don't see a way to fix that. Cinema 4D is the Python Interpreter, and multiprocessing is designed to execute several instance of the current Python interpreter.</p>
<p dir="auto"><a href="https://groups.google.com/g/python_inside_maya/c/6aWAcFEzl3U" target="_blank" rel="noopener noreferrer nofollow ugc">Maya</a> and <a href="https://blender.stackexchange.com/questions/8530/how-to-get-python-multiprocessing-module-working-on-windows" target="_blank" rel="noopener noreferrer nofollow ugc">Blender</a> have the exact same behavior than Cinema 4D.</p>
<p dir="auto">You can somehow do it by overriding <code>sys.executable</code> and <code>__file__</code> as explained <a href="https://blender.stackexchange.com/a/32779" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>, but you will not be able to use any Cinema 4D API call within this MP.<br />
Moreover it may break some other functionality so I would recommend restoring them as their default value at the end of the execution of your MP thing <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=":)" alt="🙂" /></p>
<p dir="auto">Hope it helps,<br />
Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum/post/67154</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/67154</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Thu, 15 Jul 2021 08:27:20 GMT</pubDate></item></channel></rss>