C#-API: The weird 'bool keep' parameter


#1

It’s spookie to find your way around the completely undocumented Max C# API. In contrast to the C ++ variant, some methods have a ‘bool keep’ parameter, does anyone know what that means?

Example:

C #
IMesh bool SetNumVCFaces (int ct, bool keep, int oldCt);

C ++
mesh.setNumVCFaces(mesh.numFaces);

PS: Through all the searching and trying things out, my beard is now just as long as that of Kevin Vandecar from Autodesk :slight_smile:


#2

according to c++ SDK header ("… SDK\maxsdk\include\mesh.h)

		/** Sets the number of color per vertex faces.
		\param ct The number of color per vertex faces to set. 
		\param keep	Specifies if the old faces should be kept if the array is being
		resized. If FALSE they are freed. 
		\param oldCt The length of the existing VCFaces array.
		\return  TRUE if storage has been allocated and the number is set;
		otherwise FALSE. */
		DllExport BOOL 	setNumVCFaces(int ct, BOOL keep=FALSE, int oldCt=0);

#3

Thank you!
good idea to look up in the header files.
For some reason there are no default parameters in the C# version.