Subject: [Nel] Exporter Plugin for 3DSMAX 4.0

From: "Valerio Santinelli" <[email-masked]>
Date: Wed, 3 Oct 2001 18:37:55 +0200

hmm.. I got a new error I didn't notice before:

calc_lm.cpp
C:\Programmi\Microsoft Visual Studio\MyProjects\nevrax\code\nel\tools\3d\plugin_max\nel_mesh_lib\calc_lm.cpp(256) : error C2440: 'initializing' : cannot convert from 'class ExclList' to 'class NameTab &'
        A reference that is not to 'const' cannot be bound to a non-lvalue

But the three lines about min() and max() did miracles ;)

Here's an extract about the Class PatchEdge of the new Max SDK

class PatchEdge

Description:

This class describes a patch edge using the vertices at the edge ends, and the indices of the patches sharing the edge.  All methods of this class are implemented by the system.

Data Members:

public:

int v1;

Index of the first vertex.

int vec12;

Vector from v1 to v2.

int vec21;

Vector from v2 to v1.

int v2;

Index of second vertex.

IntTab patches;

Index of the patches using this edge. If the edge is only used by one patch, patches[1] will be less than zero. Note: Previous to R4.0 two separate integer variables (
patch1 and patch2) were used.

int aux1; 

This is used to track topology changes during editing (Edit Patch).

int aux2; 

This is used to track topology changes during editing (PatchMesh).

I'm going to try to patch the code myself.. let's see what happens ;)

--
c'ya!

Valerio Santinelli
[email-masked]
HateSeed Gaming Magazine http://www.hateseed.com/
My Lab http://tanis.hateseed.com/
In Flames Italia http://www.inflames.it/

---

From: "Valerio Santinelli" <[email-masked]>
Date: Wed, 3 Oct 2001 19:27:22 +0200

I've had to do some other things in order to get the plugin running.

In the docs, you're saying which ms scripts to move to the scripts directory of 3dsmax, but there are 2 scripts left out. I had to copy them both:

nel_flare.ms
nel_ps.ms

I'm also missing object_viewer.cfg
I cannot find it anywhere in NeL's cvs.

I'm also trying to compile the various .dlu and such but I'm stuck with this error:

--------------------Configuration: nel_mesh_lib - Win32 ReleaseDebug--------------------
Compiling...
calc_lm.cpp
Error executing cl.exe.

I'm also attaching the diffs to the files I patched in order to work with 3dsmax 4.0 SDK.

--
c'ya!

Valerio Santinelli
[email-masked]

  ----- Original Message ----- 
  From: Valerio Santinelli 
  To: [email-masked] 
  Sent: Wednesday, October 03, 2001 6:37 PM
  Subject: [Nel] Exporter Plugin for 3DSMAX 4.0

  calc_lm.cpp

  class PatchEdge

  Description:

  Data Members:

  public:

  int v1;

  int vec12;

  Vector from v1 to v2.

  int vec21;

  Vector from v2 to v1.

  int v2;

  Index of second vertex.

  IntTab patches;

  int aux1; 

  int aux2; 

  --
  c'ya!

  Valerio Santinelli
  [email-masked]

---

From: "Cyril 'Hulud' Corvazier" <[email-masked]>
Date: Thu, 4 Oct 2001 10:53:07 +0200

Hi Valerio,

Ok, it looks like a patch edge can be shared by more than 2 patches in max4.
So, max guys have removed the two patch references (patch1, patch2) and replace them by an int array.

So, in max 4, it should be possible to redefine patch1 like this:

#ifdef NEL_FOR_MAX4
#define patch1 patches[0]
#define patch2 patches[1]
#endif // NEL_FOR_MAX4

I haven't tested thoses solutions, but it should work.
  IntTab patches;

Regards,

Cyril.

---

From: "Cyril 'Hulud' Corvazier" <[email-masked]>
Date: Thu, 4 Oct 2001 11:02:07 +0200

Hi,

Ok, thanks for the patch, i will add the modification to the original source code.
  In the docs, you're saying which ms scripts to move to the scripts directory of 3dsmax, but there are 2 scripts left out. I had to copy them both:
   
  nel_flare.ms
  nel_ps.ms
 Ok, i will update the documentation.
  I'm also missing object_viewer.cfg
We will add a copy of the file in the folder nel/tools/3d/object_viewer
  I'm also trying to compile the various .dlu and such but I'm stuck with this error:
   
  --------------------Configuration: nel_mesh_lib - Win32 ReleaseDebug--------------------
  Compiling...
  calc_lm.cpp
  C:\Programmi\Microsoft Visual Studio\MyProjects\nevrax\code\nel\tools\3d\plugin_max\nel_mesh_lib\calc_lm.cpp(256) : error C2440: 'initializing' : cannot convert from 'class ExclList' to 'class NameTab &'
          A reference that is not to 'const' cannot be bound to a non-lvalue
  Error executing cl.exe.
 Ok, i will check this quickly.

Thank for your posts Valerio. :-)

Regards,

Cyril.

---

From: "Valerio Santinelli" <[email-masked]>
Date: Thu, 4 Oct 2001 20:13:54 +0200

#ifdef NEL_FOR_MAX4

---

From: "Valerio Santinelli" <[email-masked]>
Date: Thu, 4 Oct 2001 20:14:46 +0200

Sorry but I sent a wrong message with the previous one :)

>#define patch2 patches[1]

Cyril, could you please add those lines to the cvs ?
Thanks!

Valerio

---

From: "Valerio Santinelli" <[email-masked]>
Date: Thu, 4 Oct 2001 22:01:03 +0200

Oops!  I just found out that those lines aren't working because of parameter
names in various functions. They replace even various references that are
just parameters and not arrays ;)

--
c'ya!

Valerio Santinelli
[email-masked]

----- Original Message -----
From: "Valerio Santinelli" <[email-masked]>
To: <[email-masked]>
Sent: Thursday, October 04, 2001 8:14 PM
Subject: Re: [Nel] Exporter Plugin for 3DSMAX 4.0

> _______________________________________________
> Nel mailing list
> [email-masked]
> /mailman/listinfo.cgi/nel

---

From: "Cyril 'Hulud' Corvazier" <[email-masked]>
Date: Fri, 5 Oct 2001 17:13:51 +0200

Hi Valerio,

I have added your fixe. We recommand to use this macro to solve max3/max4 sdk compatibilty :

// Define the macro
#include <plugapi.h>

#if (MAX_RELEASE < 4000)
// Code for max version < 4
...
else // (MAX_RELEASE < 4000)
// Code for max 4
...
endif // (MAX_RELEASE < 4000)

  --------------------Configuration: nel_mesh_lib - Win32 ReleaseDebug--------------------
  Compiling...
  calc_lm.cpp
  C:\Programmi\Microsoft Visual Studio\MyProjects\nevrax\code\nel\tools\3d\plugin_max\nel_mesh_lib\calc_lm.cpp(256) : error C2440: 'initializing' : cannot convert from 'class ExclList' to 'class NameTab &'
          A reference that is not to 'const' cannot be bound to a non-lvalue
  Error executing cl.exe.
I have disactived the code under max4 and add a "todo" comment. 
The reason is GetExclusionList() doesn't return a NameTab any more but a ExclTab. And i don't know what a ExclTab is !
Feel free to make a patch for this part. :-) 

Regards,

Cyril Corvazier