<?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[Attach XPresso Graph to GUI via Python]]></title><description><![CDATA[<p dir="auto">User Information:<br />
Cinema 4D Version: R19;<br />
Platform:   Windows  ;<br />
Language(s) : Python ;</p>
<p dir="auto">Hello Everyone!</p>
<p dir="auto">Its been a while I have not post anything. Well I have been getting an error on  attaching a xpresso node graph to a gui manual<br />
dialog. I don't know or understand why its not working but hope y'all can he me. <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--disappointed" style="height:23px;width:auto;vertical-align:middle" title=":disappointed:" alt="😞" /><br />
Code:</p>
<pre><code>        self.GroupBegin(self.ID_GRP, c4d.BFH_SCALEFIT, 1, 0, "")
        # Static UI Text
        self.AddStaticText(0, c4d.BFH_CENTER, 0, 15, "Node Editor", c4d.BORDER_WITH_TITLE_BOLD)
        # Get Active Document
        doc = c4d.documents.GetActiveDocument()
        if doc == None:
            return False
        # Search for the Object in the (Objects) List Manger Hierarchy Outliner Tab.
        getnodeobj = doc.SearchObject("node")
        if getnodeobj == None:
            return ValueError("Make sure the selected object.")       
        # Retrieves the Xpresso Tag
        graphtag = getnodeobj.GetTag(c4d.Texpresso)
        if graphtag is None:
            raise ValueError("Make sure the selected object get an Xpresso Tag.")        
        else:
            # Set Xpresso Tag Name
            graphtag[c4d.ID_BASELIST_NAME]="Custom Node Graph Editor"
            print(graphtag)
            """
            Retrieves the node master and retrieves the Root node (the Main XGroup) 
            that holds all others nodes and set name of (the Main XGroup)
            """
            gvNodeMaster = graphtag.GetNodeMaster()
            if gvNodeMaster is None:
                raise RuntimeError("Failed to retrieves the Node Master.")
            else:
                nodegraph_root_group = gvNodeMaster.GetRoot()
                if nodegraph_root_group is None:
                    raise RuntimeError("Failed to retrieves the Root Node.")
                else:
                    # Set the Main XGroup Name            
                    nodegraph_root_group[c4d.ID_BASELIST_NAME]="Tool Node Editor"
                    print(nodegraph_root_group)
                # Add to UI
                self.AddUserArea(self.ID_NODE_VIEWPORT, c4d.BFH_CENTER, 350, 200)
                self.AttachUserArea(gvNodeMaster, self.ID_NODE_VIEWPORT)
        self.GroupEnd()
</code></pre>
<p dir="auto">Error in Console:<br />
<img src="https://developers.maxon.net/forum/assets/uploads/files/1575460933843-2019-12-04_6-55-11.png" alt="2019-12-04_6-55-11.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">But if there is another way of making a custom node graph editor via python , I would love to know. <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f601.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--grin" style="height:23px;width:auto;vertical-align:middle" title=":grin:" alt="😁" /><br />
Any help would be very much appreciated.</p>
<p dir="auto">cheers, Ashton</p>
]]></description><link>http://developers.maxon.net/forum//topic/12022/attach-xpresso-graph-to-gui-via-python</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Mar 2026 09:33:58 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum//topic/12022.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Dec 2019 12:04:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Attach XPresso Graph to GUI via Python on Fri, 12 Aug 2022 09:36:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ashton_fcs_plugindev">@<bdi>ashton_fcs_plugindev</bdi></a><br />
That is so cool , Is it finish yet? I am new to GeUserArea too , That's a dreamly example to learn GeUserArea.</p>
]]></description><link>http://developers.maxon.net/forum//post/69615</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/69615</guid><dc:creator><![CDATA[Dunhou]]></dc:creator><pubDate>Fri, 12 Aug 2022 09:36:22 GMT</pubDate></item><item><title><![CDATA[Reply to Attach XPresso Graph to GUI via Python on Sun, 16 Feb 2020 23:07:35 GMT]]></title><description><![CDATA[<p dir="auto">A little update on the node editor via Python <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=";)" alt="😉" />  small demo: <a href="https://streamable.com/xk97e" target="_blank" rel="noopener noreferrer nofollow ugc">Node Graph Editor via C4D Python API Video</a><br />
I will share with the c4d py devs community when I'am done with this beast of a script.<br />
<img src="https://developers.maxon.net/forum/assets/uploads/files/1581893068532-2020-02-16_17-40-38.png" alt="2020-02-16_17-40-38.png" class=" img-fluid img-markdown" /></p>
]]></description><link>http://developers.maxon.net/forum//post/61546</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/61546</guid><dc:creator><![CDATA[Ashton_FCS_PluginDev]]></dc:creator><pubDate>Sun, 16 Feb 2020 23:07:35 GMT</pubDate></item><item><title><![CDATA[Reply to Attach XPresso Graph to GUI via Python on Tue, 10 Dec 2019 17:15:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/s_bach">@<bdi>s_bach</bdi></a> Okay I will give it a try , and I will do a open source example project for anyone, who would love to do this with python only for Cinema 4D. lol I been making different types c4d python plugins for 3 years now, from 2015 for my studio I work for and I love making c4d plugins. But this will be my first time using GeUserArea Class to the fullest lol.<img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f923.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--rolling_on_the_floor_laughing" style="height:23px;width:auto;vertical-align:middle" title=":rolling_on_the_floor_laughing:" alt="🤣" /></p>
]]></description><link>http://developers.maxon.net/forum//post/60649</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60649</guid><dc:creator><![CDATA[Ashton_FCS_PluginDev]]></dc:creator><pubDate>Tue, 10 Dec 2019 17:15:13 GMT</pubDate></item><item><title><![CDATA[Reply to Attach XPresso Graph to GUI via Python on Mon, 09 Dec 2019 08:24:34 GMT]]></title><description><![CDATA[<p dir="auto">Yes, using GeUserArea is a way of creating a custom node editor (or any kind of custom UI).</p>
]]></description><link>http://developers.maxon.net/forum//post/60603</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60603</guid><dc:creator><![CDATA[s_bach]]></dc:creator><pubDate>Mon, 09 Dec 2019 08:24:34 GMT</pubDate></item><item><title><![CDATA[Reply to Attach XPresso Graph to GUI via Python on Fri, 06 Dec 2019 13:23:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/s_bach">@<bdi>s_bach</bdi></a> Okay I look at that tread, So pyQt is out of the window sense it's not good to use or wont work the right way and maxon is not going to add it or support it and don't do it for a commercial plugin,  The only way is using c4d.gui.GeUserArea (<a href="https://developers.maxon.net/docs/py/2023_2/modules/c4d.gui/GeUserArea/index.html" target="_blank" rel="noopener noreferrer nofollow ugc">GeUserArea</a>) like Octane Node Graph and cmNodes. It will just be alot of work, when doing this with GeUserArea. I just want make sure I'm understanding everything correctly?</p>
]]></description><link>http://developers.maxon.net/forum//post/60582</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60582</guid><dc:creator><![CDATA[Ashton_FCS_PluginDev]]></dc:creator><pubDate>Fri, 06 Dec 2019 13:23:53 GMT</pubDate></item><item><title><![CDATA[Reply to Attach XPresso Graph to GUI via Python on Thu, 05 Dec 2019 09:35:52 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">you can implement a custom class based on <a href="https://developers.maxon.net/docs/py/2023_2/modules/c4d.gui/GeUserArea/index.html?highlight=geuserarea" target="_blank" rel="noopener noreferrer nofollow ugc">GeUserArea</a>. In such custom gadget, you can control everything: what is drawn, how it is drawn and how the user interaction works. The problem is that you have implement all of that yourself. So depending on the complexity of your desired solution, this can be a lot of work.</p>
<p dir="auto">See this previous discussion: <a href="https://developers.maxon.net/forum/topic/9990/13454_node-graph" target="_blank" rel="noopener noreferrer nofollow ugc">Node Graph</a></p>
<p dir="auto">best wishes,<br />
Sebastian</p>
]]></description><link>http://developers.maxon.net/forum//post/60557</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60557</guid><dc:creator><![CDATA[s_bach]]></dc:creator><pubDate>Thu, 05 Dec 2019 09:35:52 GMT</pubDate></item><item><title><![CDATA[Reply to Attach XPresso Graph to GUI via Python on Wed, 04 Dec 2019 12:32:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/s_bach">@<bdi>s_bach</bdi></a> Hi s_bach Is there another way of making a custom node graph editor via python? Cause I dont know c++ , so any tip can be  great.</p>
]]></description><link>http://developers.maxon.net/forum//post/60544</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60544</guid><dc:creator><![CDATA[Ashton_FCS_PluginDev]]></dc:creator><pubDate>Wed, 04 Dec 2019 12:32:01 GMT</pubDate></item><item><title><![CDATA[Reply to Attach XPresso Graph to GUI via Python on Wed, 04 Dec 2019 12:27:02 GMT]]></title><description><![CDATA[<p dir="auto">How the Xpresso Node UI is added to a GeDialog is shown here: <a href="https://github.com/PluginCafe/cinema4d_cpp_sdk_extended/blob/362182f134d2e050b329529de7bd50f42071f76a/plugins/cinema4dsdk/source/gui/gedialog_gadgets.cpp#L882-L914" target="_blank" rel="noopener noreferrer nofollow ugc">gedialog_gadgets.cpp</a></p>
<p dir="auto">However, since <code>GvGetWorld()</code> and related functions are not available in Python, I guess it is not possible to use the Xpresso UI in a Python based GeDialog.</p>
<p dir="auto">best wishes,<br />
Sebastian</p>
]]></description><link>http://developers.maxon.net/forum//post/60543</link><guid isPermaLink="true">http://developers.maxon.net/forum//post/60543</guid><dc:creator><![CDATA[s_bach]]></dc:creator><pubDate>Wed, 04 Dec 2019 12:27:02 GMT</pubDate></item></channel></rss>