SceneImport Class Reference

#include <impexp.h>

Class Description

See also
Class ImpInterface, Class Interface.

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

Public Member Functions

 SceneImport ()
 
virtual ~SceneImport ()
 
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 DoImport (const MCHAR *name, ImpInterface *ii, Interface *i, BOOL suppressPrompts=FALSE)=0
 
virtual int ZoomExtents ()
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Constructor & Destructor Documentation

SceneImport ( )
inline
Remarks
Constructor.
48 {};
virtual ~SceneImport ( )
inlinevirtual
Remarks
Destructor.
50 {};

Member Function Documentation

virtual int ExtCount ( )
pure virtual
Remarks
Returns the number of file name extensions supported by the plug-in.
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.
virtual const MCHAR* LongDesc ( )
pure virtual
Remarks
Returns a long ASCII description of the file type being imported (i.e. "Autodesk 3D Studio File").
virtual const MCHAR* ShortDesc ( )
pure virtual
Remarks
Returns a short ASCII description of the file type being imported (i.e. "3D Studio").
virtual const MCHAR* AuthorName ( )
pure virtual
Remarks
Returns the ASCII Author name.
virtual const MCHAR* CopyrightMessage ( )
pure virtual
Remarks
Returns the ASCII Copyright message for the plug-in.
virtual const MCHAR* OtherMessage1 ( )
pure virtual
Remarks
Returns the first message string that is displayed.
virtual const MCHAR* OtherMessage2 ( )
pure virtual
Remarks
Returns the second message string that is displayed.
virtual unsigned int Version ( )
pure virtual
Remarks
Returns the version number of the import plug-in. The format is the version number * 100 (i.e. v3.01 = 301).
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.
virtual int DoImport ( const MCHAR name,
ImpInterface ii,
Interface i,
BOOL  suppressPrompts = FALSE 
)
pure virtual
Remarks
This method actually performs the file import.
Parameters:
const MCHAR *name

The file name chosen by the user to import.

ImpInterface *ii

An import interface pointer that may be used to create objects and nodes in the scene.

Interface *i

Pass the 3ds Max interface pointer here.

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 import plugins which operate unattended. See Interface::ImportFromFile().
Returns
One of the following three values should be returned:
#define IMPEXP_FAIL 0
#define IMPEXP_SUCCESS 1
#define IMPEXP_CANCEL 2
virtual int ZoomExtents ( )
inlinevirtual
Remarks
This method is used to control the zoom extents done after the import is accomplished. It returns a value that indicates if the plug-in should override the user preference setting.

Also see the method Interface::GetImportZoomExtents() which returns the state of the system zoom extents flag.
Returns
One of the following values:

ZOOMEXT_NOT_IMPLEMENTED

Indicates to use the preference setting.

ZOOMEXT_YES

Indicates to do a zoom extents after import regardless of the preference setting.

ZOOMEXT_NO

Indicates to not do a zoom extents regardless of the preference setting.
Default Implementation:
{ return ZOOMEXT_NOT_IMPLEMENTED; }
126 { return ZOOMEXT_NOT_IMPLEMENTED; } // Override this for zoom extents control
#define ZOOMEXT_NOT_IMPLEMENTED
Definition: impexp.h:33