<?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[Python Source Protector: Can it be called via CLI?]]></title><description><![CDATA[<p dir="auto">Good morning,</p>
<p dir="auto">the topic says everything: We have the Source Protector in Cinema, which encrypts Python plugins. Can that function be called via the command line, or does it always require manual UI interaction?</p>
<p dir="auto">Thanks &amp; greetings,<br />
Frank</p>
]]></description><link>http://developers.maxon.net/forum/topic/11874/python-source-protector-can-it-be-called-via-cli</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 09:03:45 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/11874.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Oct 2019 08:22:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Wed, 09 Mar 2022 14:24:18 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, Ferdinand! Much appreciated. I always forget about c4dpy and that it can still be run in parallel to a running C4D instance.<br />
Thanks.</p>
]]></description><link>http://developers.maxon.net/forum/post/68564</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/68564</guid><dc:creator><![CDATA[a_block]]></dc:creator><pubDate>Wed, 09 Mar 2022 14:24:18 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Wed, 09 Mar 2022 12:30:11 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/a_block">@<bdi>a_block</bdi></a>,</p>
<p dir="auto">ah okay. Well that is true. I assume you want some kind of batch operation here, right? Using c4dpy in the manner I did demonstrate will not bring you any further in this case, as it will replace just one window with another one. But you could pass in a dummy script, e.g., something like this:</p>
<p dir="auto"><img src="https://developers.maxon.net/forum/assets/uploads/files/1646828688551-ed12fd2b-e2c6-47d9-9330-b97237de9e69-image.png" alt="ed12fd2b-e2c6-47d9-9330-b97237de9e69-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Which won't cause the call in a shell script to c4dpy the shell script to halt, as calling c4dpy without a script will launch the live interpreter, while calling it with a script will only execute the script (i.e., the same as the Python binary of vanilla CPython behaves). The content of <code>dummyScript.py</code> is irrelevant, it could be the empty file. With that you could chain multiple calls to c4dpy in a shell script together and execute them in one go, without you having to close the windows.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum/post/68562</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/68562</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Wed, 09 Mar 2022 12:30:11 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Wed, 09 Mar 2022 11:46:39 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the explanation.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a> said in <a href="https://developers.maxon.net/forum/post/68560" target="_blank" rel="noopener noreferrer nofollow ugc">Python Source Protector: Can it be called via CLI?</a>:</p>
<blockquote>
<p dir="auto">I am not sure how you mean that, g_encryptPypFile will not open any dialogs. What is a "file requester"? Sorry when I am overlooking here the obvious ...</p>
</blockquote>
<p dir="auto">No need to feel sorry. But in this case the obvious is, I would need to close C4D and start it with this command line option only for this specific purpose. And since there is no more -parallel option, I assume that I can't do this in parallel to a running instance. And within the running instance my only option seems to be the command, which opens a file requester.</p>
]]></description><link>http://developers.maxon.net/forum/post/68561</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/68561</guid><dc:creator><![CDATA[a_block]]></dc:creator><pubDate>Wed, 09 Mar 2022 11:46:39 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Wed, 09 Mar 2022 11:45:07 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/a_block">@<bdi>a_block</bdi></a>,</p>
<blockquote>
<p dir="auto">Since the command line option got added, do we also have an option to call the command in a way, that it does not open a file requester? So that we could script our own source protection mechanisms?</p>
</blockquote>
<p dir="auto">I am not sure how you mean that, <code>g_encryptPypFile</code> will not open any dialogs. What is a "file requester"? Sorry when I am overlooking here the obvious ...</p>
<blockquote>
<p dir="auto">Or could we achieve the same in Python shell ...</p>
</blockquote>
<p dir="auto">Yes.</p>
<p dir="auto"><img src="https://developers.maxon.net/forum/assets/uploads/files/1646824910408-bd15c5d5-ae72-434a-b65c-8f864656b915-image.png" alt="bd15c5d5-ae72-434a-b65c-8f864656b915-image.png" class=" img-fluid img-markdown" /></p>
<blockquote>
<p dir="auto">Is it anything else than creating byte code?</p>
</blockquote>
<p dir="auto">It is fundamentally different. A Python code execution chain is something like this:</p>
<p dir="auto"><code>[Python Code] --- Python Compiler ---&gt; [Python Byte Code] --- Python Interpreter (VM) ---&gt; [Machine Code]</code></p>
<p dir="auto">The source protection does not do anything about this chain (opposed to <code>.pyc</code> files for example, which indeed cut out the step of compiling human readable instructions into byte-code). It instead just puts a step in front of this chain:</p>
<p dir="auto"><code>[Protected Code] --- Cinema 4D ---&gt; [Python Code] --- Python Compiler ---&gt; [Python Byte Code] --- ...</code></p>
<p dir="auto">The files are protected with AES, so cracking the files itself will be (almost) impossible. But since decomplication from byte code is easy in Python, and stuff must reside in memory at some point, "source protection" should be treated more as "source obfuscation". It will not be a hurdle for anyone dedicated to finding out what your code is.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
]]></description><link>http://developers.maxon.net/forum/post/68560</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/68560</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Wed, 09 Mar 2022 11:45:07 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Wed, 09 Mar 2022 07:09:02 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
sorry, to hook onto this topic. Since the command line option got added, do we also have an option to call the command in a way, that it does not open a file requester? So that we could script our own source protection mechanisms?<br />
Or could we achieve the same in Python shell (I mean the Python executable delivered with C4D) outside of C4D? Is it anything else than creating byte code?<br />
Cheers,<br />
Andreas</p>
]]></description><link>http://developers.maxon.net/forum/post/68556</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/68556</guid><dc:creator><![CDATA[a_block]]></dc:creator><pubDate>Wed, 09 Mar 2022 07:09:02 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Mon, 07 Mar 2022 08:32:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi sorry to net get back to you in this topic.</p>
<p dir="auto">This feature was added in R23 and can be used like so <code>g_encryptPypFile="PathToPypFile"</code><br />
You can pass one or multiple pyp file, they should be separated with <code>;</code>.</p>
<p dir="auto">Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum/post/68552</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/68552</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Mon, 07 Mar 2022 08:32:26 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Fri, 04 Mar 2022 19:51:44 GMT]]></title><description><![CDATA[<p dir="auto">Hi C4D team.<br />
Is that functionality still under development?</p>
]]></description><link>http://developers.maxon.net/forum/post/68549</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/68549</guid><dc:creator><![CDATA[baca]]></dc:creator><pubDate>Fri, 04 Mar 2022 19:51:44 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Mon, 08 Jun 2020 16:08:35 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your feedback, and yes regarding the compatibility this would produce the same as the one produced from the UI.</p>
<p dir="auto">In any case, I can't give you an estimate about when it will be implemented.<br />
Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum/post/63285</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/63285</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Mon, 08 Jun 2020 16:08:35 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Mon, 08 Jun 2020 15:28:44 GMT]]></title><description><![CDATA[<p dir="auto">Sounds like a good solution to me, too!<br />
And I second Kent's question about the compatibility of encryptet pyp files.</p>
]]></description><link>http://developers.maxon.net/forum/post/63283</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/63283</guid><dc:creator><![CDATA[fwilleke80]]></dc:creator><pubDate>Mon, 08 Jun 2020 15:28:44 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Fri, 05 Jun 2020 10:43:23 GMT]]></title><description><![CDATA[<p dir="auto">That should work fine for my purposes. I just need to pass in the file to get encrypted and have it write the result to the same directory. But then C4D should quit afterwards. Would be amazing if this was possible.</p>
<p dir="auto">If this was added to S22 ( or S23 ) then would the resulting pypv files also load in R20 and R21?</p>
]]></description><link>http://developers.maxon.net/forum/post/63254</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/63254</guid><dc:creator><![CDATA[kbar]]></dc:creator><pubDate>Fri, 05 Jun 2020 10:43:23 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Fri, 05 Jun 2020 10:21:21 GMT]]></title><description><![CDATA[<p dir="auto">Hi just to get back on the topic, do you have any special requirement for it or does a configuration variable(see <a href="https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_configuration.html#page_maxonapi_configuration_definition" target="_blank" rel="noopener noreferrer nofollow ugc">CONFIGURATION - Definition</a>) to set like g_encryptPypFile=YourPathToAPypFile;AnotherPathToAPypFile is enough?</p>
<p dir="auto">Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum/post/63250</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/63250</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Fri, 05 Jun 2020 10:21:21 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Wed, 03 Jun 2020 06:11:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/kbar">@<bdi>kbar</bdi></a> said in <a href="https://developers.maxon.net/forum/post/63210" target="_blank" rel="noopener noreferrer nofollow ugc">Python Source Protector: Can it be called via CLI?</a>:</p>
<blockquote>
<p dir="auto">I am going to bump this also.This function should be able to be called by command line. I would like to do this via my build system. By calling the cinema4d.exe, or c4dpy, with the python plugin path.</p>
</blockquote>
<p dir="auto"><img src="https://media.giphy.com/media/cmrWcwC3A4ryH437Ru/giphy.gif" alt="PPLLEEEAASSSEEEE!" class=" img-fluid img-markdown" /></p>
]]></description><link>http://developers.maxon.net/forum/post/63211</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/63211</guid><dc:creator><![CDATA[lasselauch]]></dc:creator><pubDate>Wed, 03 Jun 2020 06:11:13 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Tue, 02 Jun 2020 23:41:07 GMT]]></title><description><![CDATA[<p dir="auto">I am going to bump this also.This function should be able to be called by command line. I would like to do this via my build system. By calling the cinema4d.exe, or c4dpy, with the python plugin path.</p>
]]></description><link>http://developers.maxon.net/forum/post/63210</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/63210</guid><dc:creator><![CDATA[kbar]]></dc:creator><pubDate>Tue, 02 Jun 2020 23:41:07 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Tue, 31 Mar 2020 22:27:22 GMT]]></title><description><![CDATA[<p dir="auto">Just wanted to bump this old thread.</p>
<p dir="auto">Any updates on this? Would love to see this in conjunction with <strong>c4dpy</strong>!</p>
<p dir="auto">Thanks &amp; Cheers,<br />
Lasse</p>
]]></description><link>http://developers.maxon.net/forum/post/62323</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/62323</guid><dc:creator><![CDATA[lasselauch]]></dc:creator><pubDate>Tue, 31 Mar 2020 22:27:22 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Wed, 09 Oct 2019 10:36:21 GMT]]></title><description><![CDATA[<p dir="auto">And in deed, having the option of executing the source protector using a command line argument for Cinema 4D, or using c4dpy would be great for integration in a plugin build pipeline.</p>
]]></description><link>http://developers.maxon.net/forum/post/59855</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/59855</guid><dc:creator><![CDATA[fwilleke80]]></dc:creator><pubDate>Wed, 09 Oct 2019 10:36:21 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Wed, 09 Oct 2019 10:35:12 GMT]]></title><description><![CDATA[<p dir="auto">That's a pity, but at least I know I can stop looking for a solution then <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="🙂" /><br />
Thanks!</p>
]]></description><link>http://developers.maxon.net/forum/post/59854</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/59854</guid><dc:creator><![CDATA[fwilleke80]]></dc:creator><pubDate>Wed, 09 Oct 2019 10:35:12 GMT</pubDate></item><item><title><![CDATA[Reply to Python Source Protector: Can it be called via CLI? on Tue, 08 Oct 2019 09:10:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi Frank</p>
<p dir="auto">Please use <a href="https://developers.maxon.net/forum/topic/11004/q-a-new-functionality" target="_blank" rel="noopener noreferrer nofollow ugc">Q&amp;A Functionality</a> for your topics.</p>
<p dir="auto">It's currently not possible. I've forward the idea.<br />
Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum/post/59822</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/59822</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Tue, 08 Oct 2019 09:10:34 GMT</pubDate></item></channel></rss>