<?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[Get CustomGUI Data in python]]></title><description><![CDATA[<p dir="auto">Hello plugincafe!<br />
I have recently created a customgui using the example customgui plugin. The only major thing that I changed, appart from drawing, is that I save a single float value.<br />
I now need to implement this custom gui into a python plugin but I can't seem to find out how to retrieve my saved data from the gui element.</p>
<p dir="auto">Do I need to completely switch to a c++ plugin to do this, or is there a way in python.</p>
<p dir="auto">Kind Regards,<br />
Florian</p>
]]></description><link>http://developers.maxon.net/forum//topic/12015/get-customgui-data-in-python</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Mar 2026 17:21:49 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum//topic/12015.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 02 Dec 2019 12:27:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Get CustomGUI Data in python on Fri, 06 Dec 2019 09:27:15 GMT]]></title><description><![CDATA[<p dir="auto">Hello Sebastian,<br />
I now understand what the difference is, thank you very much!<br />
With the customdata_customgui example file I actually made both a GUI and a custom DataType. So I only needed to change my resource file and modifiy my data code a bit!</p>
<p dir="auto">Best Regards,<br />
Florian</p>
]]></description><link>http://developers.maxon.net/forum//post/60578</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60578</guid><dc:creator><![CDATA[neon]]></dc:creator><pubDate>Fri, 06 Dec 2019 09:27:15 GMT</pubDate></item><item><title><![CDATA[Reply to Get CustomGUI Data in python on Fri, 06 Dec 2019 08:46:15 GMT]]></title><description><![CDATA[<p dir="auto">Please make sure you understand the difference between a data type and a GUI. A data type stores data of some type. A GUI displays that data and allows interaction with that data in the UI. But it does not persistently store the data.</p>
<p dir="auto">So if you want to have a parameter in your object that stores a float value, just use a REAL parameter. You can display that parameter in the UI using a custom GUI element. See for example <a href="https://github.com/PluginCafe/cinema4d_cpp_sdk_extended/blob/master/plugins/cinema4dsdk/source/gui/customgui_string.cpp" target="_blank" rel="noopener noreferrer nofollow ugc">customgui_string.cpp</a>.</p>
<p dir="auto">best wishes,<br />
Sebastian</p>
]]></description><link>http://developers.maxon.net/forum//post/60575</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60575</guid><dc:creator><![CDATA[s_bach]]></dc:creator><pubDate>Fri, 06 Dec 2019 08:46:15 GMT</pubDate></item><item><title><![CDATA[Reply to Get CustomGUI Data in python on Thu, 05 Dec 2019 10:03:15 GMT]]></title><description><![CDATA[<p dir="auto">oh... yeah that is true.</p>
<p dir="auto">I edited the customdata_customgui example to fit my needs. (mainly only the drawing).<br />
So I guess I would have to change my customdata to a REAL customgui?</p>
]]></description><link>http://developers.maxon.net/forum//post/60561</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60561</guid><dc:creator><![CDATA[neon]]></dc:creator><pubDate>Thu, 05 Dec 2019 10:03:15 GMT</pubDate></item><item><title><![CDATA[Reply to Get CustomGUI Data in python on Thu, 05 Dec 2019 09:59:10 GMT]]></title><description><![CDATA[<p dir="auto">Sorry, but this is not how it works. <a href="https://github.com/PluginCafe/cinema4d_cpp_sdk_extended/blob/362182f134d2e050b329529de7bd50f42071f76a/plugins/cinema4dsdk/res/description/odescription.res#L41" target="_blank" rel="noopener noreferrer nofollow ugc">A NodeData's res file looks like this</a>:</p>
<pre><code>STRING ID_RESULT_TEXT  { CUSTOMGUI MULTISTRING; ANIM OFF; }
</code></pre>
<p dir="auto">The first symbol is the data type (<code>STRING</code>), the second the parameter ID, The custom GUI can be found after the <code>CUSTOMGUI</code> keyword.</p>
<p dir="auto">So in your case, <code>MY_CUSTOMGUI</code> is <strong>NOT</strong> a custom GUI. It is a custom data type. Is that correct?</p>
]]></description><link>http://developers.maxon.net/forum//post/60559</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60559</guid><dc:creator><![CDATA[s_bach]]></dc:creator><pubDate>Thu, 05 Dec 2019 09:59:10 GMT</pubDate></item><item><title><![CDATA[Reply to Get CustomGUI Data in python on Thu, 05 Dec 2019 09:48:23 GMT]]></title><description><![CDATA[<p dir="auto">Hello Sebastian,<br />
basically I have something like this</p>
<p dir="auto">[...]<br />
MY_CUSTOMGUI CUSTOMGUIPARAM { }<br />
[...]</p>
<p dir="auto">that is what I use.</p>
]]></description><link>http://developers.maxon.net/forum//post/60558</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60558</guid><dc:creator><![CDATA[neon]]></dc:creator><pubDate>Thu, 05 Dec 2019 09:48:23 GMT</pubDate></item><item><title><![CDATA[Reply to Get CustomGUI Data in python on Thu, 05 Dec 2019 09:31:13 GMT]]></title><description><![CDATA[<p dir="auto">In an ObjectData plugin, you don't access GUIs. You access <strong>parameters</strong>. So what is the parameter type that is using your custom GUI? Can you show your *.res file?</p>
]]></description><link>http://developers.maxon.net/forum//post/60556</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60556</guid><dc:creator><![CDATA[s_bach]]></dc:creator><pubDate>Thu, 05 Dec 2019 09:31:13 GMT</pubDate></item><item><title><![CDATA[Reply to Get CustomGUI Data in python on Thu, 05 Dec 2019 09:01:31 GMT]]></title><description><![CDATA[<p dir="auto">Hello Maxime,<br />
thanks for you answer!<br />
I actually have my custom gui not in a GeDialog but inside a res file of an ObjectData. How would I be able to access the customgui from there?</p>
<p dir="auto">Best Regards,<br />
Florian</p>
]]></description><link>http://developers.maxon.net/forum//post/60555</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60555</guid><dc:creator><![CDATA[neon]]></dc:creator><pubDate>Thu, 05 Dec 2019 09:01:31 GMT</pubDate></item><item><title><![CDATA[Reply to Get CustomGUI Data in python on Tue, 03 Dec 2019 09:51:29 GMT]]></title><description><![CDATA[<p dir="auto">Hi if your data type is already a know python type you shouldn't have any issue and could use the <a href="https://developers.maxon.net/docs/py/2023_2/modules/c4d.gui/BaseCustomGui/index.html?highlight=getdata#BaseCustomGui.GetData" target="_blank" rel="noopener noreferrer nofollow ugc">BaseCustomGui.GetData</a> / <a href="https://developers.maxon.net/docs/py/2023_2/modules/c4d.gui/BaseCustomGui/index.html?highlight=setdata#BaseCustomGui.SetData" target="_blank" rel="noopener noreferrer nofollow ugc">BaseCustomGui.SetData</a>.</p>
<p dir="auto">So if we take the C++ example of the <a href="https://github.com/PluginCafe/cinema4d_cpp_sdk_extended/blob/master/plugins/cinema4dsdk/source/gui/customgui_string.cpp" target="_blank" rel="noopener noreferrer nofollow ugc">String Custom GUI</a>.<br />
You can use it in Python like bellow:</p>
<pre><code>import c4d

ID_CUSTOM_GUI = 1001
ID_BUTTON_DO = 1002

class myCustomGuiDlg(c4d.gui.GeDialog):
    
    def CreateLayout(self):
        
        self._customGui = self.AddCustomGui(ID_CUSTOM_GUI, 1034655, 'my value', c4d.BFH_SCALEFIT, 50, 10)
        self.AddButton(ID_BUTTON_DO,c4d.BFH_SCALEFIT,name = 'Get Data')
        return True
    
    def InitValues(self):
        self._customGui.SetData("Some custom text")
        return True
    
    
    def Command(self, id, msg):
        if id == ID_BUTTON_DO:
            print self._customGui.GetData()
            
        return True
    

if __name__=='__main__':
    dlg = myCustomGuiDlg()
    dlg.Open(c4d.DLG_TYPE_ASYNC)
</code></pre>
<p dir="auto">Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum//post/60511</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60511</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Tue, 03 Dec 2019 09:51:29 GMT</pubDate></item></channel></rss>