<?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[Plugin Manager &quot;Create Reload Script&quot; generates invalid Python string path on Windows]]></title><description><![CDATA[<p dir="auto">Hi Community,</p>
<p dir="auto">I noticed a small issue with <strong>Plugin Manager → Create Reload Script</strong> on Windows.</p>
<p dir="auto">I often use <strong>Reload Python Plugins</strong> while developing Python plugins, but it reloads all Python plugins. In some cases, especially with renderer-related plugins, this can also trigger viewport/material refreshes.</p>
<p dir="auto"><strong>Create Reload Script</strong> is very useful because it allows reloading a specific plugin only. However, on Windows, the generated script uses an unescaped path with backslashes:</p>
<pre><code>plugins.ReloadPythonPlugin(
    path="C:\Users\&lt;user&gt;\AppData\Roaming\Maxon\Maxon Cinema 4D 2026_XXXXXXXX\plugins\PluginName\PluginName.pyp",
    reloadDocumentAfterReload=False,
    reloadOnlyActiveDocument=False
)
</code></pre>
<p dir="auto">Running the generated script in the Script Manager causes:</p>
<pre><code>SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
</code></pre>
<p dir="auto">Manually replacing <code>\</code> with <code>/</code>, using a raw string, or escaping the backslashes fixes the issue.</p>
<p dir="auto">It would be great if <strong>Create Reload Script</strong> could generate a Python-safe path automatically on Windows.</p>
<p dir="auto">Thanks!</p>
]]></description><link>http://developers.maxon.net/forum/topic/16414/plugin-manager-create-reload-script-generates-invalid-python-string-path-on-windows</link><generator>RSS for Node</generator><lastBuildDate>Mon, 25 May 2026 06:51:40 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/16414.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 May 2026 02:02:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Plugin Manager &quot;Create Reload Script&quot; generates invalid Python string path on Windows on Thu, 21 May 2026 08:02:23 GMT]]></title><description><![CDATA[<p dir="auto">Hey <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/anlv">@<bdi>Anlv</bdi></a>,</p>
<p dir="auto">Thank you for reaching out to us and reporting this. I just changed it so that the path is always a raw string. This will be shipped with an upcoming (but not the next) public release.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
<p dir="auto">I.e., your script will then be as follows where there is an <code>r</code> in front of the string, which should fix the issue on Windows.</p>
<pre><code class="language-py">plugins.ReloadPythonPlugin(
    path = r"C:\Users\&lt;user&gt;\AppData\Roaming\Maxon\Maxon Cinema 4D 2026_XXXXXXXX\plugins\PluginName\PluginName.pyp",
    reloadDocumentAfterReload=False,
    reloadOnlyActiveDocument=False
)
</code></pre>
]]></description><link>http://developers.maxon.net/forum/post/77172</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77172</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Thu, 21 May 2026 08:02:23 GMT</pubDate></item></channel></rss>