<?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: Print all scene objects Parent-Child combo names to txt file in 3Ds max using maxscript in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11008021#M4364</link>
    <description>&lt;LI-CODE lang="csharp"&gt;(
	local outputFileName = @"C:\TMP\output.json"
	local json = python.import "json"
	local py = python.import "builtins"

	local outputFile = createFile outputFileName
	local output = py.dict #()

	for obj in objects where obj.children.count &amp;gt; 0 or obj.parent == undefined do
		output[obj.name] = py.list (for c in obj.children collect c.name)

	format (json.dumps output) to:outputFile
	close outputFile
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're on max 2020 or earlier, you'd use &lt;FONT face="courier new,courier"&gt;python.import "__builtin__"&lt;/FONT&gt; instead of&amp;nbsp;&lt;FONT face="courier new,courier"&gt;python.import "builtins"&lt;/FONT&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2022 07:17:14 GMT</pubDate>
    <dc:creator>Swordslayer</dc:creator>
    <dc:date>2022-03-16T07:17:14Z</dc:date>
    <item>
      <title>Print all scene objects Parent-Child combo names to txt file in 3Ds max using maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11007785#M4361</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a scene where I have lots of objects and their child objects too. however, I want to print all parent objects names and their child object names to the .txt file in the proper way using max script.&lt;BR /&gt;I tried to print selection by selecting parent first and then Childs but I didn’t get it in proper manner and that also printed position and transformation data which I don’t need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected text file printing Format:&lt;/P&gt;&lt;P&gt;&amp;lt;Parent 1 object name&amp;gt;&lt;BR /&gt;&amp;lt;child 1&amp;gt;&lt;BR /&gt;&amp;lt;child 2&amp;gt;&lt;BR /&gt;&amp;lt;child 3&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;Parent 2 object name&amp;gt;&lt;BR /&gt;&amp;lt;child 1&amp;gt;&lt;BR /&gt;&amp;lt;child 2&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;child 3&amp;gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="object list.png" style="width: 375px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1036774i4D5AC4B2CEDB929D/image-size/large?v=v2&amp;amp;px=999" role="button" title="object list.png" alt="object list.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 03:48:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11007785#M4361</guid>
      <dc:creator>arthvaja</dc:creator>
      <dc:date>2022-03-16T03:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Print all scene objects Parent-Child combo names to txt file in 3Ds max using maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11007876#M4362</link>
      <description>&lt;P&gt;maybe at least xml or json format?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 05:27:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11007876#M4362</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2022-03-16T05:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Print all scene objects Parent-Child combo names to txt file in 3Ds max using maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11007889#M4363</link>
      <description>&lt;P&gt;yeah, .json file also workable for me.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 05:39:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11007889#M4363</guid>
      <dc:creator>arthvaja</dc:creator>
      <dc:date>2022-03-16T05:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Print all scene objects Parent-Child combo names to txt file in 3Ds max using maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11008021#M4364</link>
      <description>&lt;LI-CODE lang="csharp"&gt;(
	local outputFileName = @"C:\TMP\output.json"
	local json = python.import "json"
	local py = python.import "builtins"

	local outputFile = createFile outputFileName
	local output = py.dict #()

	for obj in objects where obj.children.count &amp;gt; 0 or obj.parent == undefined do
		output[obj.name] = py.list (for c in obj.children collect c.name)

	format (json.dumps output) to:outputFile
	close outputFile
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're on max 2020 or earlier, you'd use &lt;FONT face="courier new,courier"&gt;python.import "__builtin__"&lt;/FONT&gt; instead of&amp;nbsp;&lt;FONT face="courier new,courier"&gt;python.import "builtins"&lt;/FONT&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 07:17:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11008021#M4364</guid>
      <dc:creator>Swordslayer</dc:creator>
      <dc:date>2022-03-16T07:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Print all scene objects Parent-Child combo names to txt file in 3Ds max using maxscript</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11008237#M4365</link>
      <description>&lt;P&gt;Thanks, it really worked for me.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 09:36:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/print-all-scene-objects-parent-child-combo-names-to-txt-file-in/m-p/11008237#M4365</guid>
      <dc:creator>arthvaja</dc:creator>
      <dc:date>2022-03-16T09:36:39Z</dc:date>
    </item>
  </channel>
</rss>

