<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Accessing nodes of closed container in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8942565#M8105</link>
    <description>&lt;P&gt;hei, no solution for this?&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2019 09:52:08 GMT</pubDate>
    <dc:creator>elpie89</dc:creator>
    <dc:date>2019-08-01T09:52:08Z</dc:date>
    <item>
      <title>Accessing nodes of closed container</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8913966#M8099</link>
      <description>&lt;P&gt;Is there any way to access node material etc of a closed container from code?&lt;/P&gt;&lt;P&gt;I need to do it with c# API but every suggestion valid for other languages could help&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 09:53:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8913966#M8099</guid>
      <dc:creator>elpie89</dc:creator>
      <dc:date>2019-07-17T09:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing nodes of closed container</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8929297#M8101</link>
      <description>&lt;P&gt;What is the problem with open it and close after? I see that you have a reason. But for me the reason is more interesting than the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 02:15:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8929297#M8101</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2019-07-25T02:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing nodes of closed container</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8932327#M8102</link>
      <description>&lt;P&gt;I'm working on a the BabylonGTLF Exporter&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/BabylonJS/Exporters" target="_blank"&gt;https://github.com/BabylonJS/Exporters&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If a user as a max file with many containers referenced?&lt;/P&gt;&lt;P&gt;How should he do?&lt;/P&gt;&lt;P&gt;the only way for what I see is to merge the containers -&amp;gt; export - &amp;gt; and then reimport the containers&lt;/P&gt;&lt;P&gt;But this is not the best solutions for many reasons, one of them is that you lost the position of the container&lt;/P&gt;&lt;P&gt;In my case using the Babylon exporter, many problems are related to Animation Groups&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 09:35:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8932327#M8102</guid>
      <dc:creator>elpie89</dc:creator>
      <dc:date>2019-07-26T09:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing nodes of closed container</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8934080#M8103</link>
      <description>&lt;P&gt;This will probably end in the same discussion we already had.. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;From MXS (and of course C++) everything should be accessible..&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 11:31:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8934080#M8103</guid>
      <dc:creator>istan</dc:creator>
      <dc:date>2019-07-27T11:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing nodes of closed container</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8934105#M8104</link>
      <description>&lt;P&gt;if you speak about this&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/3ds-max-programming/attach-two-mesh-in-c-api/m-p/8932937#M23943" target="_blank"&gt;https://forums.autodesk.com/t5/3ds-max-programming/attach-two-mesh-in-c-api/m-p/8932937#M23943&lt;/A&gt;&lt;/P&gt;&lt;P&gt;yes the solution was there, actually, if something is accessible from C++ it is also for C#&lt;/P&gt;&lt;P&gt;Of course, will be only more difficult to find.&lt;/P&gt;&lt;P&gt;But in this case, I'm not even sure Autodesk exposed the containers closed nodes in any languages, or at least I can't find it&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 12:20:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8934105#M8104</guid>
      <dc:creator>elpie89</dc:creator>
      <dc:date>2019-07-27T12:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing nodes of closed container</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8942565#M8105</link>
      <description>&lt;P&gt;hei, no solution for this?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 09:52:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8942565#M8105</guid>
      <dc:creator>elpie89</dc:creator>
      <dc:date>2019-08-01T09:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing nodes of closed container</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8943538#M8106</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2166134"&gt;@elpie89&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;hei, no solution for this?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Well... let's start from beginning.&lt;/P&gt;&lt;P&gt;(first of all i don't care about c# API, all that I show is c++ API)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to get access to IContainerObject what can be done with couple headers:&lt;/P&gt;&lt;PRE&gt;#include &amp;lt;IContainerObject.h&amp;gt;
#include &amp;lt;IContainerManager.h&amp;gt;&lt;/PRE&gt;&lt;P&gt;next is to get the&amp;nbsp; IContainerObject*:&lt;/P&gt;&lt;PRE&gt;	//INode* node = ...
	{
		if (GetContainerManagerInterface()-&amp;gt;IsContainerNode(node))
		{
			IContainerObject* obj = IContainerObject::GetInterface(node-&amp;gt;GetObjectRef());
			if (obj)
			{
...&lt;/PRE&gt;&lt;P&gt;you can't get nodes from closed container, so if it is closed you have to open:&lt;/P&gt;&lt;PRE&gt;				BOOL open = obj-&amp;gt;IsOpen();
				if (!open) obj-&amp;gt;SetOpen(true); 

				NodeTab nodes;
				obj-&amp;gt;GetContentNodes(get_nested, nodes);
...&lt;/PRE&gt;&lt;P&gt;and close the container if it was opened by the method...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to know and understand two things:&lt;/P&gt;&lt;P&gt;#1 - if you open and close containers you will see scene redraw. So take care of this by using disable/enable scene redraw&lt;/P&gt;&lt;P&gt;#2 - when you open closed container the scene "merge" mechanism works, and it wipes Undo history&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS. actually you have to know three things:&lt;/P&gt;&lt;P&gt;#3 - when you close opened by the method container you loose access to the container's nodes. So you have to do all your "export" inside the method&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 17:00:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8943538#M8106</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2019-08-01T17:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing nodes of closed container</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8943756#M8107</link>
      <description>&lt;P&gt;Ok there is something I'm missing here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you open an inherited container? Because from what I see I can only merge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already implemented a sort of solution like you suggest but using the merge&lt;/P&gt;&lt;P&gt;What I do is:&lt;/P&gt;&lt;P&gt;HoldFile()&lt;/P&gt;&lt;P&gt;merge containers&lt;/P&gt;&lt;P&gt;export the scene&lt;/P&gt;&lt;P&gt;FetchFile()&lt;/P&gt;&lt;P&gt;Evything works, I thought there was a better way to access node from API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 18:24:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8943756#M8107</guid>
      <dc:creator>elpie89</dc:creator>
      <dc:date>2019-08-01T18:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing nodes of closed container</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8943809#M8108</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2166134"&gt;@elpie89&lt;/a&gt;&amp;nbsp;wrote:&lt;P&gt;Can you open an inherited container? Because from what I see I can only merge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already implemented a sort of solution like you suggest but using the merge&lt;/P&gt;&lt;P&gt;What I do is:&lt;/P&gt;&lt;P&gt;HoldFile()&lt;/P&gt;&lt;P&gt;merge containers&lt;/P&gt;&lt;P&gt;export the scene&lt;/P&gt;&lt;P&gt;FetchFile()&lt;/P&gt;&lt;P&gt;Evything works, I thought there was a better way to access node from API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;you can get nodes from a 'nested' (inherited) container. check the method&amp;nbsp;&lt;STRONG&gt;GetContentNodes&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;next...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when you merge nodes from container it's almost the same as open the contained (the difference is only that you can merge for opened containers as well). But merging has the same issue - wiping the undo stack.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the exporting action has not to be at the 'middle of work'. usually it has to be done at time 'out for editing'. so the opening of closed containers looks cleaner and safer for me (at least you don't need to Hold and Fetch the scene).&lt;/P&gt;&lt;P&gt;Hold and Fetch might be an option for the export method as well as it can be delegated&amp;nbsp;to user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 18:46:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/accessing-nodes-of-closed-container/m-p/8943809#M8108</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2019-08-01T18:46:56Z</dc:date>
    </item>
  </channel>
</rss>

