3ds Max C++ API Reference
Loading...
Searching...
No Matches
SceneExport Class Referenceabstract

#include <impexp.h>

+ Inheritance diagram for SceneExport:

Public Member Functions

 SceneExport ()
 
virtual ~SceneExport ()
 
virtual int ExtCount ()=0
 
virtual const MCHARExt (int n)=0
 
virtual const MCHARLongDesc ()=0
 
virtual const MCHARShortDesc ()=0
 
virtual const MCHARAuthorName ()=0
 
virtual const MCHARCopyrightMessage ()=0
 
virtual const MCHAROtherMessage1 ()=0
 
virtual const MCHAROtherMessage2 ()=0
 
virtual unsigned int Version ()=0
 
virtual void ShowAbout (HWND hWnd)=0
 
virtual int DoExport (const MCHAR *name, ExpInterface *ei, Interface *i, BOOL suppressPrompts=FALSE, DWORD options=0)=0
 
virtual BOOL SupportsOptions (int ext, DWORD options)
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Detailed Description

See also
Class ExpInterface, Class Interface.

Description:
This is a base class for creating file export plug-ins. The plug-in implements methods of this class to describe the properties of the export plug-in and a method that handles the actual export process.

Constructor & Destructor Documentation

◆ SceneExport()

SceneExport ( )
inline
Remarks
Constructor.
141{};

◆ ~SceneExport()

virtual ~SceneExport ( )
inlinevirtual
Remarks
Destructor.
143{};

Member Function Documentation

◆ ExtCount()

virtual int ExtCount ( )
pure virtual
Remarks
Returns the number of file name extensions supported by the plug-in.

◆ Ext()

virtual const MCHAR * Ext ( int  n)
pure virtual
Remarks
Returns the 'i-th' file name extension (i.e. "3DS").
Parameters:
int i

The index of the file name extension to return.

◆ LongDesc()

virtual const MCHAR * LongDesc ( )
pure virtual
Remarks
Returns a long ASCII description of the file type being exported (i.e. "Autodesk 3D Studio File").

◆ ShortDesc()

virtual const MCHAR * ShortDesc ( )
pure virtual
Remarks
Returns a short ASCII description of the file type being exported (i.e. "3D Studio").

◆ AuthorName()

virtual const MCHAR * AuthorName ( )
pure virtual
Remarks
Returns the ASCII Author name.

◆ CopyrightMessage()

virtual const MCHAR * CopyrightMessage ( )
pure virtual
Remarks
Returns the ASCII Copyright message for the plug-in.

◆ OtherMessage1()

virtual const MCHAR * OtherMessage1 ( )
pure virtual
Remarks
Returns the first message string that is displayed.

◆ OtherMessage2()

virtual const MCHAR * OtherMessage2 ( )
pure virtual
Remarks
Returns the second message string that is displayed.

◆ Version()

virtual unsigned int Version ( )
pure virtual
Remarks
Returns the version number of the export plug-in. The format is the version number * 100 (i.e. v3.01 = 301).

◆ ShowAbout()

virtual void ShowAbout ( HWND  hWnd)
pure virtual
Remarks
This method is called to have the plug-in display its "About..." box.
Parameters:
HWND hWnd

The parent window handle for the dialog.

◆ DoExport()

virtual int DoExport ( const MCHAR name,
ExpInterface ei,
Interface i,
BOOL  suppressPrompts = FALSE,
DWORD  options = 0 
)
pure virtual
Remarks
This method is called for the plug-in to perform its file export.
Parameters:
const MCHAR *name

The export file name.

ExpInterface *ei

A pointer the plug-in may use to call methods to enumerate the scene.

Interface *i

An interface pointer the plug-in may use to call methods of 3ds Max.

BOOL suppressPrompts=FALSE

This parameter is available in release 2.0 and later only.

When TRUE, the plug-in must not display any dialogs requiring user input. It is up to the plug-in as to how to handle error conditions or situations requiring user input. This is an option set up for the 3ds Max API in order for plug-in developers to create batch export plugins which operate unattended. See Interface::ExportToFile().

DWORD options=0

This parameter is available in release 3.0 and later only.

In order to support export of selected objects (as well as future enhancements), this method now has this additional parameter. The only currently defined option is:

SCENE_EXPORT_SELECTED

When this bit is set the export module should only export the selected nodes.
Returns
One of the following three values should be returned:
#define IMPEXP_FAIL 0
#define IMPEXP_SUCCESS 1
#define IMPEXP_CANCEL 2

◆ SupportsOptions()

virtual BOOL SupportsOptions ( int  ext,
DWORD  options 
)
inlinevirtual
Remarks
This method is called by 3ds Max to determine if one or more export options are supported by a plug-in for a given extension. It should return TRUE if all option bits set are supported for this extension; otherwise FALSE.

Note that the method has a default implementation defined in order to provide easy backward compatibility. It returns FALSE, indicating that no options are supported.
Parameters:
int ext

This parameter indicates which extension the options are being queried for, based on the number of extensions returned by the SceneExport::ExtCount() method. This index is zero based.

DWORD options

This parameter specifies which options are being queried, and may have more than one option specified. At present, the only export option is SCENE_EXPORT_SELECTED, but this may change in the future. If more than one option is specified in this field, the plugin should only return TRUE if all of the options are supported. If one or more of the options are not supported, the plugin should return FALSE.
Default Implementation:
{return FALSE;}
230{ UNUSED_PARAM(ext); UNUSED_PARAM(options); return FALSE;}
#define UNUSED_PARAM(x)
Definition: BuildWarnings.h:18