<?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[how to  control the on&#x2F;off of a node in expresso?]]></title><description><![CDATA[<p dir="auto">I want to control the on/off of a node in expresso.<br />
and i found the "on" attribute  can do it.<br />
but I can't  add the input port  in python.<br />
anyone can help me ?<br />
thank you very  much!</p>
]]></description><link>http://developers.maxon.net/forum/topic/11386/how-to-control-the-on-off-of-a-node-in-expresso</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 05:48:18 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/11386.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Feb 2019 13:47:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to how to  control the on&#x2F;off of a node in expresso? on Fri, 13 Sep 2019 15:36:40 GMT]]></title><description><![CDATA[<p dir="auto">This issue is now fixed in R21.</p>
<p dir="auto">Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum/post/59320</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/59320</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Fri, 13 Sep 2019 15:36:40 GMT</pubDate></item><item><title><![CDATA[Reply to how to  control the on&#x2F;off of a node in expresso? on Sat, 16 Mar 2019 13:26:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/m_adam">@<bdi>m_adam</bdi></a> Although I didn't get a solution to this problem, I found a solution to my own problem. Thank you very much.</p>
]]></description><link>http://developers.maxon.net/forum/post/57684</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/57684</guid><dc:creator><![CDATA[milkliu]]></dc:creator><pubDate>Sat, 16 Mar 2019 13:26:26 GMT</pubDate></item><item><title><![CDATA[Reply to how to  control the on&#x2F;off of a node in expresso? on Fri, 15 Mar 2019 11:24:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/milkliu">@<bdi>milkliu</bdi></a>,</p>
<p dir="auto">Unfortunately, I do have bad news, after some research it's currently not possible to add the "On" port in Python due to a bug.</p>
<p dir="auto">With that's said here is an example of how to creates Node and Port in Xpresso. (As I said it does not work for the On port, and some generics ports so this example will currently not work)</p>
<pre><code>import c4d


def main():
    # Checks if selected object is valid
    if op is None:
        raise ValueError("op is none, please select one object.")

    # Retrieves the xpresso Tag
    xpressoTag = op.GetTag(c4d.Texpresso)
    if xpressoTag is None:
        raise ValueError("Make sure the selected object get an Xpresso Tag.")

    # Retrieves the node master
    gvNodeMaster = xpressoTag.GetNodeMaster()
    if gvNodeMaster is None:
        raise RuntimeError("Failed to retrieves the Node Master.")

    # Retrieves the Root node (the Main XGroup) that holds all others nodes
    gvRoot = gvNodeMaster.GetRoot()
    if gvRoot is None:
        raise RuntimeError("Failed to retrieves the Root Node.")

    # Creates a Link node in the GvRoot
    linkNode = gvNodeMaster.CreateNode(gvRoot, c4d.ID_OPERATOR_OBJECT, x=100, y=100)
    if linkNode is None:
        raise RuntimeError("Failed to creates the link Node.")

    # Defines the target of the link node to the host object of the Xpresso (in this case objHost, is the same as op)
    objHost = linkNode.GetNodeMaster().GetOwner().GetObject()
    linkNode[c4d.GV_OBJECT_OBJECT_ID] = objHost

    # Creates the "On" Port
    onPort = None
    if linkNode.AddPortIsOK(c4d.GV_PORT_INPUT, c4d.GV_OBJECT_OPERATOR_ON):
        onPort = linkNode.AddPort(c4d.GV_PORT_INPUT, c4d.DescID(c4d.DescLevel(c4d.GV_OBJECT_OPERATOR_ON)), c4d.GV_PORT_FLAG_IS_VISIBLE, True)

    if onPort is None:
        raise RuntimeError("Failed to creates the On Port.")

    # Updates Cinema 4D
    c4d.EventAdd()


if __name__ == '__main__':
    main()
</code></pre>
<p dir="auto">Hopefully, it will be fixed in the next release, but I can't promise anything.<br />
In any case, I will bump this thread when the fix is available.<br />
Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum/post/57676</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/57676</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Fri, 15 Mar 2019 11:24:17 GMT</pubDate></item><item><title><![CDATA[Reply to how to  control the on&#x2F;off of a node in expresso? on Fri, 15 Mar 2019 01:16:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/m_adam">@<bdi>m_adam</bdi></a> I want to add it with a script from the script manager</p>
]]></description><link>http://developers.maxon.net/forum/post/57664</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/57664</guid><dc:creator><![CDATA[milkliu]]></dc:creator><pubDate>Fri, 15 Mar 2019 01:16:21 GMT</pubDate></item><item><title><![CDATA[Reply to how to  control the on&#x2F;off of a node in expresso? on Thu, 14 Mar 2019 08:57:10 GMT]]></title><description><![CDATA[<p dir="auto">Do you want to add the port with a script from the script manager or a Python GvNode?</p>
]]></description><link>http://developers.maxon.net/forum/post/57643</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/57643</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Thu, 14 Mar 2019 08:57:10 GMT</pubDate></item><item><title><![CDATA[Reply to how to  control the on&#x2F;off of a node in expresso? on Thu, 14 Mar 2019 08:54:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/merkvilson">@<bdi>merkvilson</bdi></a><br />
sorry，I should put more information about my question.<br />
I want to add the "<strong>on</strong>"  port in the gif  below use python.</p>
<p dir="auto"><img src="https://i.imgur.com/iNP5BDt.gif" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>http://developers.maxon.net/forum/post/57642</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/57642</guid><dc:creator><![CDATA[milkliu]]></dc:creator><pubDate>Thu, 14 Mar 2019 08:54:05 GMT</pubDate></item><item><title><![CDATA[Reply to how to  control the on&#x2F;off of a node in expresso? on Fri, 01 Mar 2019 10:55:11 GMT]]></title><description><![CDATA[<p dir="auto">I guess you want to create a node of the node.<br />
<img src="https://i.imgur.com/iKcy5AG.gif" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>http://developers.maxon.net/forum/post/57530</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/57530</guid><dc:creator><![CDATA[merkvilson]]></dc:creator><pubDate>Fri, 01 Mar 2019 10:55:11 GMT</pubDate></item><item><title><![CDATA[Reply to how to  control the on&#x2F;off of a node in expresso? on Fri, 01 Mar 2019 10:43:50 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/milkliu">@<bdi>milkliu</bdi></a></p>
<p dir="auto">Please provides us more information about the initial setup and the expected behavior.<br />
Are you trying to control the enable state of the current python node, or any other nodes?<br />
Should these nodes be linked together?</p>
<p dir="auto">Cheers,<br />
Maxime.</p>
]]></description><link>http://developers.maxon.net/forum/post/57528</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/57528</guid><dc:creator><![CDATA[m_adam]]></dc:creator><pubDate>Fri, 01 Mar 2019 10:43:50 GMT</pubDate></item></channel></rss>