<?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[Sharing a child between two nodes]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Is it possible to make two SBStructuralNodeGroup share childs? I would like to have access in the document view to the childs at two points, like:</p>
<pre><code>-- Model
   -- parent
         --child
         --child2
         --child3
         -- ...
   -- parent 2
         --child
</code></pre>
<p dir="auto">The child can be owned by only one of them, but I would like that parent 2 also has a reference to it and it is shown in the document view. Is it possible? Unfortunately SBNodeGroup is not a solution for me since I want the hierarchy to access next and previous nodes, and I would like the SBNodeGroups to be contained also in a hierarchy. Like:</p>
<pre><code>My Group (with next/previous getters)
  -- sub group 1
       -- "shared" child 1
  -- sub group 2
  -- sub group 3
</code></pre>
<p dir="auto">Thank you and best regards,</p>
<p dir="auto">Elisa</p>
]]></description><link>https://forum.samson-connect.net/topic/57/sharing-a-child-between-two-nodes</link><generator>RSS for Node</generator><lastBuildDate>Sun, 13 Sep 2026 02:11:27 GMT</lastBuildDate><atom:link href="https://forum.samson-connect.net/topic/57.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 20 Jun 2018 09:06:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sharing a child between two nodes on Thu, 21 Jun 2018 07:30:44 GMT]]></title><description><![CDATA[<p dir="auto">Thank you!<br />
I will try it with this.</p>
<p dir="auto">Yes, I meant SBStructuralGroup :)</p>
]]></description><link>https://forum.samson-connect.net/post/187</link><guid isPermaLink="true">https://forum.samson-connect.net/post/187</guid><dc:creator><![CDATA[Elisa]]></dc:creator><pubDate>Thu, 21 Jun 2018 07:30:44 GMT</pubDate></item><item><title><![CDATA[Reply to Sharing a child between two nodes on Thu, 21 Jun 2018 01:11:21 GMT]]></title><description><![CDATA[<p dir="auto">Hi Elisa, it's indeed not possible since a child can have only one parent. One possible workaround is to have the second potential parent to store a reference to the node, and expose the node as an attribute. You'll then see the referenced node in the inspector.</p>
<p dir="auto">For example, let's say this referenced node is called "Target", you write an accessor <code> SBNode* MyNode::getTarget() const</code> and you expose this attribute in the descriptor (where you expose functions, see <a href="https://documentation.samson-connect.net/developers/latest/page_introspection.html" rel="nofollow ugc">https://documentation.samson-connect.net/developers/latest/page_introspection.html</a>) with:</p>
<pre><code>SB_ATTRIBUTE_READ_ONLY(SBNode*, MyNode, Target, "Target", "References");
</code></pre>
<p dir="auto">By the way, maybe you mean SBStructuralGroup (to have groups and sub-groups in a structural model)? A SBNodeGroup is essentially a stored, named selection, and is not hierarchical.</p>
<p dir="auto">Best,</p>
<p dir="auto">Stephane</p>
]]></description><link>https://forum.samson-connect.net/post/186</link><guid isPermaLink="true">https://forum.samson-connect.net/post/186</guid><dc:creator><![CDATA[Stephane]]></dc:creator><pubDate>Thu, 21 Jun 2018 01:11:21 GMT</pubDate></item></channel></rss>