<?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: Deleting a node without crashing in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/deleting-a-node-without-crashing/m-p/6785695#M13512</link>
    <description>&lt;P&gt;Thanks! The problem was I was trying node-&amp;gt;Delete() rather than interface-&amp;gt;DeleteNode(Node)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2017 18:35:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-01-05T18:35:31Z</dc:date>
    <item>
      <title>Deleting a node without crashing</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/deleting-a-node-without-crashing/m-p/6785623#M13510</link>
      <description>&lt;P&gt;I am writing an import plugin, and we import our proprietary format for the whole scene, and then import a different proprietary format for debug visualization (e.g. the visibility level of each triangle). This all works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are now trying to export this combined scene as an FBX, but with all the hidden geometry being deleted. So, as we load the visualization, we examine each node as to whether it is hidden or not, and try to delete it (or colorize, or hide, depending). The issue is all attempts to delete nodes result in a crash.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried DeleteMe(), Delete(), Detach() then delete to no avail. Everything I've found on the web implies DeleteMe() is the call to use as this handles detaching, deleting, and undo. This happens on the first item from the root node.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The crash is:&amp;nbsp;File: s:\3ds_max_2016_di\src\3dswin\src\core\ref.cpp&lt;BR /&gt;Line: 1069&lt;BR /&gt;Function: ReferenceTarget::DeleteAllRefsToMe&lt;BR /&gt;Expression: currentRefMaker == NULL || numOrigRefs != currentRefMaker-&amp;gt;NumRefs() || currentRefMaker-&amp;gt;GetReference(which) == NULL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 18:06:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/deleting-a-node-without-crashing/m-p/6785623#M13510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-05T18:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting a node without crashing</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/deleting-a-node-without-crashing/m-p/6785664#M13511</link>
      <description>&lt;P&gt;I would assume that these nodes were not created properly by your plugin or you keep INode pointers not being valid.&lt;/P&gt;
&lt;P&gt;Simple node deletion is easy - of course only when the nodes you created are working properly:&lt;/P&gt;
&lt;P&gt;ip-&amp;gt;DeleteNode(INode*)&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 18:22:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/deleting-a-node-without-crashing/m-p/6785664#M13511</guid>
      <dc:creator>istan</dc:creator>
      <dc:date>2017-01-05T18:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting a node without crashing</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/deleting-a-node-without-crashing/m-p/6785695#M13512</link>
      <description>&lt;P&gt;Thanks! The problem was I was trying node-&amp;gt;Delete() rather than interface-&amp;gt;DeleteNode(Node)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 18:35:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/deleting-a-node-without-crashing/m-p/6785695#M13512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-05T18:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting a node without crashing</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/deleting-a-node-without-crashing/m-p/6785712#M13513</link>
      <description>&lt;P&gt;as already said above a node deletion should be just simple as GetCOREInterface()-&amp;gt;DeleteNode(node)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but if might be a badly organized connection of this node with another(s) (for example script controller that doesn't check validity of target nodes). &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 18:43:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/deleting-a-node-without-crashing/m-p/6785712#M13513</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2017-01-05T18:43:36Z</dc:date>
    </item>
  </channel>
</rss>

