<?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: (C++ SDK) Create EditNormals modifier in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11574305#M3443</link>
    <description>&lt;P&gt;Thank you very much! Of the two solutions here, this is the one that worked for me slight modifications. I do have a couple of followup questions if you don't mind.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. How did you know which hex value to use for the Class_ID? Is there some lookup table for Mod ID's I'm missing?&lt;/P&gt;&lt;P&gt;2. While this works, and the normals are getting updated, it only works if I'm selecting the modifier, otherwise it won't update the viewport with the changes until I select the modifier. I've tried playing around with the NotifyDependents logic but unfortunately they don't seem to work. Is there another call I need to do to have it render the result without being on the modifier?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 22:14:22 GMT</pubDate>
    <dc:creator>liam.jacksonFCFHA</dc:creator>
    <dc:date>2022-11-23T22:14:22Z</dc:date>
    <item>
      <title>(C++ SDK) Create EditNormals modifier</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11571941#M3440</link>
      <description>&lt;P&gt;Please excuse my amateurish knowledge, I am very new to 3DS Max as a DCC and it's C++ SDK. Assuming I have the iNode of mesh, I would like to add an EditNormals modifier to it, and perform some operations on it. I can find some examples for some other modifiers like MaxMorph, but it seems like this modifier's behaviour on the backend is quite different. The only resource I can seem to find on it is&amp;nbsp;&lt;SPAN&gt;IEditNormalsMod, but no example of how to properly initialize/use it, and I'm not even sure if that is the correct path. I don't suppose anyone can point me to a resource, or provide a small example of adding this modifier.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My end goal is simply to reset/recalculate the normals, which looks like can be done via the Unify operation on the EditNormals modifier.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 03:58:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11571941#M3440</guid>
      <dc:creator>liam.jacksonFCFHA</dc:creator>
      <dc:date>2022-11-23T03:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: (C++ SDK) Create EditNormals modifier</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11572481#M3441</link>
      <description>&lt;P&gt;something like this should do the job....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;#include "iEditNormals.h"

#define EDIT_NORMALS_CLASS_ID Class_ID(0x4aa52ae3, 0x35ca1cde)

Modifier* mod = (Modifier*)CreateInstance(OSM_CLASS_ID, EDIT_NORMALS_CLASS_ID);
if (mod)
{
	IEditNormalsMod* eni = (IEditNormalsMod*)mod-&amp;gt;GetInterface(EDIT_NORMALS_MOD_INTERFACE);
	if (eni)
	{

		
		IDerivedObject* dobj = CreateDerivedObject(obj);
		dobj-&amp;gt;AddModifier(mod);
		node-&amp;gt;SetObjectRef(dobj);
		mod-&amp;gt;NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE);
		mod-&amp;gt;NotifyDependents(FOREVER, PART_ALL, REFMSG_NUM_SUBOBJECTTYPES_CHANGED);
        eni-&amp;gt;EnfnUnifyNormals();
		....
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;though there are easier and faster ways to reset an objects normals&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 10:16:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11572481#M3441</guid>
      <dc:creator>klvnk</dc:creator>
      <dc:date>2022-11-23T10:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: (C++ SDK) Create EditNormals modifier</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11572536#M3442</link>
      <description>&lt;P&gt;I would use&lt;/P&gt;&lt;LI-CODE lang="general"&gt;BOOL needDel;
TriObject* tri = GetTriObjectFromNode(node, t, needDel);
if (!tri) return;
Mesh* mesh = &amp;amp;tri-&amp;gt;GetMesh();
mesh-&amp;gt;buildNormals();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;without a modifier.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 10:30:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11572536#M3442</guid>
      <dc:creator>istan</dc:creator>
      <dc:date>2022-11-23T10:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: (C++ SDK) Create EditNormals modifier</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11574305#M3443</link>
      <description>&lt;P&gt;Thank you very much! Of the two solutions here, this is the one that worked for me slight modifications. I do have a couple of followup questions if you don't mind.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. How did you know which hex value to use for the Class_ID? Is there some lookup table for Mod ID's I'm missing?&lt;/P&gt;&lt;P&gt;2. While this works, and the normals are getting updated, it only works if I'm selecting the modifier, otherwise it won't update the viewport with the changes until I select the modifier. I've tried playing around with the NotifyDependents logic but unfortunately they don't seem to work. Is there another call I need to do to have it render the result without being on the modifier?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 22:14:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11574305#M3443</guid>
      <dc:creator>liam.jacksonFCFHA</dc:creator>
      <dc:date>2022-11-23T22:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: (C++ SDK) Create EditNormals modifier</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11574308#M3444</link>
      <description>&lt;P&gt;Unfortunately this doesn't seem to work for me as the mesh attribute of the TriObject is not getting initialized properly. I really appreciate you answering here though!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 22:15:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11574308#M3444</guid>
      <dc:creator>liam.jacksonFCFHA</dc:creator>
      <dc:date>2022-11-23T22:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: (C++ SDK) Create EditNormals modifier</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11574988#M3445</link>
      <description>&lt;P&gt;the Class ID is in the source code.... maxsdk\samples\mesh\EditNormals.cpp or you can just get it from maxscript i.e.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;$.modifiers[1].classid&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yeah the having to have the modifier selected is one of the issues of EditNormals modifier, the code post by Istan should work. Are you trying to clear normals previously created by an EditNormals modifier ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if so then....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;obj-&amp;gt;GetMesh().ClearSpecifiedNormals();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;should do the trick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 08:06:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/c-sdk-create-editnormals-modifier/m-p/11574988#M3445</guid>
      <dc:creator>klvnk</dc:creator>
      <dc:date>2022-11-24T08:06:20Z</dc:date>
    </item>
  </channel>
</rss>

