3ds Max C++ API Reference
IPathConfigMgr Class Referenceabstract

Provides access to application path configuration functionality. More...

#include <IPathConfigMgr.h>

+ Inheritance diagram for IPathConfigMgr:

Public Member Functions

virtual bool LoadPathConfiguration (const MCHAR *filename)=0
 Loads a path configuration file. More...
 
virtual bool MergePathConfiguration (const MCHAR *filename)=0
 Merges a path configuration file. More...
 
virtual bool SavePathConfiguration (const MCHAR *filename)=0
 Saves out the current path configuration to the specified file. More...
 
virtual const MCHARGetDir (int which) const =0
 Returns the default directory for the specified ID. More...
 
virtual bool SetDir (int which, const MCHAR *dir)=0
 Sets the default directory. More...
 
virtual int GetPlugInEntryCount () const =0
 Returns the number of plugin path entries in PLUGIN.INI. More...
 
virtual const MCHARGetPlugInDesc (int i) const =0
 Returns the description string for the given entry number. More...
 
virtual const MCHARGetPlugInDir (int i) const =0
 Returns the directory string for the given entry number. More...
 
virtual int GetAssetDirCount (MaxSDK::AssetManagement::AssetType assetType) const =0
 Returns the number of assetType directories in path. More...
 
virtual const MCHARGetAssetDir (int i, MaxSDK::AssetManagement::AssetType assetType) const =0
 Returns the ith assetType directory in path. More...
 
virtual bool AddAssetDir (const MCHAR *dir, MaxSDK::AssetManagement::AssetType assetType)=0
 Adds an assetType path to the list. More...
 
virtual bool AddAssetDir (const MCHAR *dir, MaxSDK::AssetManagement::AssetType assetType, int update)=0
 Adds an assetType path to the list. More...
 
virtual bool DeleteAssetDir (int i, MaxSDK::AssetManagement::AssetType assetType, int update)=0
 Deletes an assetType path. More...
 
virtual bool AddSessionAssetDir (const MCHAR *dir, MaxSDK::AssetManagement::AssetType assetType, int update)=0
 Adds a session path. More...
 
virtual int GetSessionAssetDirCount (MaxSDK::AssetManagement::AssetType assetType) const =0
 Returns the number of assetType session directories in path. More...
 
virtual const MCHARGetSessionAssetDir (int i, MaxSDK::AssetManagement::AssetType assetType) const =0
 Returns the assetType session directory in path. More...
 
virtual bool DeleteSessionAssetDir (int i, MaxSDK::AssetManagement::AssetType assetType, int update)=0
 Deletes a session path. More...
 
virtual int GetCurAssetDirCount (MaxSDK::AssetManagement::AssetType assetType) const =0
 Gets the combined total of session and permanent paths. More...
 
virtual const MCHARGetCurAssetDir (int i, MaxSDK::AssetManagement::AssetType assetType) const =0
 Gets the ith assetType directory. More...
 
virtual void UpdateAssetSection (MaxSDK::AssetManagement::AssetType assetType)=0
 Forces an update on the application. More...
 
virtual MSTR GetMAXIniFile () const =0
 Returns the name of the .ini file used by 3ds Max. More...
 
virtual bool GetResolveUNC () const =0
 Returns the Preferences --> Files [Convert networked file paths to UNC] property. More...
 
virtual void SetResolveUNC (bool aFlag)=0
 Sets the Preferences --> Files [Convert networked file paths to UNC] property. More...
 
virtual bool GetResolveToRelative () const =0
 Returns the Preferences --> Files [Convert local file paths to Relative] property If this method returns true, then paths selected as assets will automatically be converted to their relative equivalents, made relative to the current Project Folder setting. More...
 
virtual void SetResolveToRelative (bool aFlag)=0
 Sets the Preferences --> Files [Convert local file paths to Relative] property If this flag is set to true, then paths selected as assets will automatically be converted to their relative equivalents, made relative to the current Project Folder setting. More...
 
virtual void NormalizePathAccordingToSettings (MaxSDK::Util::Path &aPath) const =0
 Will Normalize this absolute path according to the current application settings. More...
 
virtual void AppendSlash (MCHAR *path) const =0
 This function appends a slash character to the end of the path passed unless one already exists. More...
 
virtual void RemoveSlash (MCHAR *path) const =0
 This function removes the slash character from the end of the path passed if present. More...
 
virtual void AppendSlash (MSTR &path) const =0
 This function appends a slash character to the end of the path passed unless one already exists. More...
 
virtual void RemoveSlash (MSTR &path) const =0
 This function removes the slash character from the end of the path passed if present. More...
 
virtual bool IsUsingProfileDirectories () const =0
 Checks whether the application is configured to use User Profile directories. More...
 
virtual bool IsUsingRoamingProfiles () const =0
 Checks whether the application is configured to use roaming profiles. More...
 
virtual bool CreateDirectoryHierarchy (const MaxSDK::Util::Path &aPath) const =0
 Creates a hierarchy of directories. More...
 
virtual bool DoesFileExist (const MaxSDK::Util::Path &aPath, bool ignoreMissingPathCache=false) const =0
 Checks if a file or directory exists in the location pointed to by the absolute path parameter, potentially considering the missing file cache. More...
 
virtual void RecordInputAsset (const MaxSDK::AssetManagement::AssetUser &originalPath, AssetEnumCallback &nameEnum, DWORD vflags) const =0
 Searches for the given path and records the path in the NameEnum according to its ability to resolve the path and if missing only is set in the flags. More...
 
virtual void RecordOutputAsset (const MaxSDK::AssetManagement::AssetUser &originalAsset, AssetEnumCallback &nameEnum, DWORD vflags) const =0
 Converts the given path to absolute and records the path in the AssetEnum according to its ability to resolve the path and if missing only is set in the flags. More...
 
virtual const MaxSDK::Util::PathGetCurrentProjectFolder () const =0
 Returns the current Project Folder folder. More...
 
virtual bool SetCurrentProjectFolder (const MaxSDK::Util::Path &aDirectory)=0
 Sets the current Project Folder folder. More...
 
virtual bool SetSessionProjectFolder (const MaxSDK::Util::Path &aDirectory)=0
 Sets a Project Folder which will be used for this application session only. More...
 
virtual bool DoProjectSetupSteps () const =0
 Initiates the steps to choose and setup a default 3ds Max project. More...
 
virtual bool DoProjectSetupStepsUsingDirectory (const MaxSDK::Util::Path &aDirectory) const =0
 Initiates the steps to set up a default 3ds Max project without prompting the user. More...
 
virtual bool DoSetProjectFolderSteps () const =0
 Initiates the steps to set an existing 3ds Max project folder as the active project folder. More...
 
virtual bool DoSetProjectFolderStepsUsingDirectory (const MaxSDK::Util::Path &aDirectory) const =0
 Initiates the steps to set an existing 3ds Max project folder as the active project folder without prompting the user. More...
 
virtual bool IsProjectFolder (const MaxSDK::Util::Path &aDirectoryToCheck) const =0
 Will check for the existence of a project in a folder. More...
 
virtual MaxSDK::Util::Path GetProjectFolderPath (const MaxSDK::Util::Path &aProjectRoot) const =0
 Will return the fully-qualified path of the project file, given the root folder of an existing project. More...
 
virtual MaxSDK::Util::Path GetCurrentProjectFolderPath () const =0
 Returns the file path of the current project file, if it exists. More...
 
virtual void MakePathRelativeToProjectFolder (MaxSDK::Util::Path &aPath) const =0
 Converts an absolute path into a path that is relative to the current Project Folder. More...
 
virtual int GetProjectSubDirectoryCount () const =0
 Gets a count of the number of Project directories. More...
 
virtual const MCHARGetProjectSubDirectory (int aIndex) const =0
 Returns a project directory according to an index, not an ID This method will return a Project directory by index, rather than by ID. More...
 
virtual void AddProjectDirectoryCreateFilter (int aID)=0
 Adds an ID to a persistent internal filter table. More...
 
virtual void RemoveAllProjectDirectoryCreateFilters ()=0
 Removes all IDs from a persistent internal filter table. More...
 
virtual void RemoveProjectDirectoryCreateFilter (int aID)=0
 Removes an ID from a persistent internal filter table. More...
 
virtual void GetProjectDirectoryCreateFilters (Tab< int > &filterIDs)=0
 Returns a Tab of the IDs in the persistent internal filter table. More...
 
- Public Member Functions inherited from FPInterfaceDesc
CoreExport FPInterfaceDesc ()
 
CoreExport FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport ~FPInterfaceDesc ()
 
virtual void Init ()
 
LifetimeType LifetimeControl ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...)
 
CoreExport void AppendFunction (int id,...)
 Add a new function to this interface descriptor. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
CoreExport void SetClassDesc (ClassDesc *i_cd)
 
CoreExport va_list check_fn (va_list ap, int id)
 
CoreExport va_list scan_fn (va_list ap, int id, int index)
 
CoreExport va_list check_prop (va_list ap, int id)
 
CoreExport va_list scan_prop (va_list ap, int id, int index)
 
CoreExport va_list check_enum (va_list ap, EnumID id)
 
CoreExport va_list scan_enum (va_list ap, EnumID id, int index)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Static Public Member Functions

static CoreExport IPathConfigMgrGetPathConfigMgr ()
 Returns the single instance of this manager. More...
 
- 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...
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClasspc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Detailed Description

Provides access to application path configuration functionality.

Note that the terms "map paths" and "External Files" (as seen in the UI) are used interchangeably below. This class provides access to all exposed path configuration functionality, including loading and saving of path configuration files. Should be used in lieu of Interface for path-related operations.

To access the single IPathConfigMgr instance, call the static function IPathConfigMgr::GetPathConfigMgr().

Member Function Documentation

◆ LoadPathConfiguration()

virtual bool LoadPathConfiguration ( const MCHAR filename)
pure virtual

Loads a path configuration file.

Loads a path configuration file and returns true if paths are loaded successfully.

Precondition
file passed to function is a path configuration file
Postcondition
Paths found in file are loaded into application persistently.
Parameters
[in]filenameThe fully-qualified path of the file to be loaded.
Returns
true if any paths are loaded

◆ MergePathConfiguration()

virtual bool MergePathConfiguration ( const MCHAR filename)
pure virtual

Merges a path configuration file.

Merges a path configuration file and returns true if paths are merged successfully. A merge differs from a load in that map, xref and plugin directories are appended to the list instead of the list being overwritten. File IO paths are simply overwritten, as is the case with load.

Precondition
file passed to function is a path configuration file
Parameters
[in]filenameThe fully-qualified path of the file to be loaded.
Returns
true if any paths are loaded

◆ SavePathConfiguration()

virtual bool SavePathConfiguration ( const MCHAR filename)
pure virtual

Saves out the current path configuration to the specified file.

Precondition
Specified path is valid and writable.
Postcondition
The current user path configuration is saved to the specified file.
Parameters
[in]filenameThe fully-qualified path of the file to which paths are saved.
Returns
true if file is successfully saved out

◆ GetDir()

virtual const MCHAR* GetDir ( int  which) const
pure virtual

Returns the default directory for the specified ID.

Parameters
[in]whichAPP_XXX_DIR directory ID. For the complete list see MaxDirectories.h.
Returns
the default directory
See also
MAX Directory IDs "MAX Directory IDs"

◆ SetDir()

virtual bool SetDir ( int  which,
const MCHAR dir 
)
pure virtual

Sets the default directory.

Parameters
[in]whichThe index of the directory to set. For the complete list see MaxDirectories.h.
[in]dirThe new default directory.
Returns
true if the directory is set and valid
See also
MAX Directory IDs "MAX Directory IDs"

◆ GetPlugInEntryCount()

virtual int GetPlugInEntryCount ( ) const
pure virtual

Returns the number of plugin path entries in PLUGIN.INI.

Returns
the number of plugin path entries.

◆ GetPlugInDesc()

virtual const MCHAR* GetPlugInDesc ( int  i) const
pure virtual

Returns the description string for the given entry number.

Parameters
[in]ientry number
Returns
the ith description string

◆ GetPlugInDir()

virtual const MCHAR* GetPlugInDir ( int  i) const
pure virtual

Returns the directory string for the given entry number.

Parameters
[in]ientry number
Returns
the ith directory string

◆ GetAssetDirCount()

virtual int GetAssetDirCount ( MaxSDK::AssetManagement::AssetType  assetType) const
pure virtual

Returns the number of assetType directories in path.

Parameters
[in]assetTypespecifies which type of count you are looking for examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
Returns
number of dirs in path

◆ GetAssetDir()

virtual const MCHAR* GetAssetDir ( int  i,
MaxSDK::AssetManagement::AssetType  assetType 
) const
pure virtual

Returns the ith assetType directory in path.

Parameters
[in]iindex of path to get
[in]assetTypespecifies the directory category from which to get the directory. examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
Returns
the ith assetType directory in path

◆ AddAssetDir() [1/2]

virtual bool AddAssetDir ( const MCHAR dir,
MaxSDK::AssetManagement::AssetType  assetType 
)
pure virtual

Adds an assetType path to the list.

Parameters
[in]dirdirectory to add
[in]assetTypespecifies the directory category to which the new directory should be added. examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
Returns
true if added successfully

◆ AddAssetDir() [2/2]

virtual bool AddAssetDir ( const MCHAR dir,
MaxSDK::AssetManagement::AssetType  assetType,
int  update 
)
pure virtual

Adds an assetType path to the list.

Parameters
[in]dirdirectory to add
[in]assetTypespecifies the directory category to which the new directory should be added. examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
[in]updateShould the .ini file containing the paths be updated with the defined search paths for the assetType after the add?

◆ DeleteAssetDir()

virtual bool DeleteAssetDir ( int  i,
MaxSDK::AssetManagement::AssetType  assetType,
int  update 
)
pure virtual

Deletes an assetType path.

Deletes a assetType path from the path list.

Parameters
[in]iDirectory to delete.
[in]assetTypeSpecifies the asset type associated with this path? examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
[in]updateShould the .ini file containing the paths be updated with the defined search paths for the assetType after the delete?
Returns
true if Deletes successfully

◆ AddSessionAssetDir()

virtual bool AddSessionAssetDir ( const MCHAR dir,
MaxSDK::AssetManagement::AssetType  assetType,
int  update 
)
pure virtual

Adds a session path.

Adds a session path to the path list. Session paths are not persistent, meaning they are lost when the application shuts down.

Parameters
[in]dirDirectory to add.
[in]assetTypeSpecifies which category of search directories should be used. examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
[in]updateShould the .ini file containing the paths be updated with the defined search paths for the assetType after the add?
Returns
true if added successfully

◆ GetSessionAssetDirCount()

virtual int GetSessionAssetDirCount ( MaxSDK::AssetManagement::AssetType  assetType) const
pure virtual

Returns the number of assetType session directories in path.

Parameters
[in]assetTypespecifies which type of count looking for examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
Returns
number of session dirs in path

◆ GetSessionAssetDir()

virtual const MCHAR* GetSessionAssetDir ( int  i,
MaxSDK::AssetManagement::AssetType  assetType 
) const
pure virtual

Returns the assetType session directory in path.

Parameters
[in]iindex of path to get
[in]assetTypespecifies which type of asset directory you are looking for examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
Returns
the ith assetType session directory in path

◆ DeleteSessionAssetDir()

virtual bool DeleteSessionAssetDir ( int  i,
MaxSDK::AssetManagement::AssetType  assetType,
int  update 
)
pure virtual

Deletes a session path.

Deletes a session path in the path list. Session paths are not persistent, meaning they are lost when the application shuts down.

Parameters
[in]iIndex for the directory to delete.
[in]assetTypespecifies which type of asset directory you are looking for examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
[in]updateShould the .ini file containing the paths be updated with the defined search paths for the assetType after the delete?
Returns
true if Deletes successfully

◆ GetCurAssetDirCount()

virtual int GetCurAssetDirCount ( MaxSDK::AssetManagement::AssetType  assetType) const
pure virtual

Gets the combined total of session and permanent paths.

These methods provide access to the combined list of permanent and temporary (session) dirs, therefore the current total set of directories for a particular asset type.

Parameters
[in]assetTypespecifies which type of count looking for examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
Returns
the combined total of session and permanent paths

◆ GetCurAssetDir()

virtual const MCHAR* GetCurAssetDir ( int  i,
MaxSDK::AssetManagement::AssetType  assetType 
) const
pure virtual

Gets the ith assetType directory.

Gets ith directory. Session paths are enumerated before permanent paths.

Parameters
[in]iindex to return
[in]assetTypespecifies which type asset directory you are looking for examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc
Returns
the ith directory

◆ UpdateAssetSection()

virtual void UpdateAssetSection ( MaxSDK::AssetManagement::AssetType  assetType)
pure virtual

Forces an update on the application.

Forces the application to update itself with the currently set path.

Parameters
[in]assetTypespecifies which type asset type directories to update examples of assetType include kBitmapAsset, kXRefAsset, kVideoPost, etc

◆ GetMAXIniFile()

virtual MSTR GetMAXIniFile ( ) const
pure virtual

Returns the name of the .ini file used by 3ds Max.

Returns
The name of the .ini file Returns empty MSTR if locType == LOC_REGISTRY.

◆ GetResolveUNC()

virtual bool GetResolveUNC ( ) const
pure virtual

Returns the Preferences --> Files [Convert networked file paths to UNC] property.

If this method returns true, then paths will automatically be converted to their UNC representation if the path originates from a mapped drive.

Returns
If paths are automatically resolved to their UNC equivalents

◆ SetResolveUNC()

virtual void SetResolveUNC ( bool  aFlag)
pure virtual

Sets the Preferences --> Files [Convert networked file paths to UNC] property.

If this flag is set to true, then paths will automatically be converted to their UNC representation if the path originates from a mapped drive.

Parameters
[in]aFlagIf paths should automatically be resolved to their UNC equivalents

◆ GetResolveToRelative()

virtual bool GetResolveToRelative ( ) const
pure virtual

Returns the Preferences --> Files [Convert local file paths to Relative] property If this method returns true, then paths selected as assets will automatically be converted to their relative equivalents, made relative to the current Project Folder setting.

See also
GetCurrentProjectFolder()
Returns
true if asset paths should be made relative

◆ SetResolveToRelative()

virtual void SetResolveToRelative ( bool  aFlag)
pure virtual

Sets the Preferences --> Files [Convert local file paths to Relative] property If this flag is set to true, then paths selected as assets will automatically be converted to their relative equivalents, made relative to the current Project Folder setting.

See also
SetCurrentProjectFolder(const MaxSDK::Util::Path& )
Parameters
[in]aFlagif asset paths should be made relative

◆ NormalizePathAccordingToSettings()

virtual void NormalizePathAccordingToSettings ( MaxSDK::Util::Path aPath) const
pure virtual

Will Normalize this absolute path according to the current application settings.

Normalizes the passed-in path according to current application settings. The passed in path must be absolute to be normalized. Relative paths are ignored. Currently, the path will be normalized according to the two settings in the application that determine whether a path should automatically be converted to to a path relative to the current application Project Folder, and, if not, whether the absolute path should be converted to its UNC equivalent.

Parameters
[in,out]aPathThe path to normalize
See also
GetResolveToUNC()
GetResolveToRelative()

◆ AppendSlash() [1/2]

virtual void AppendSlash ( MCHAR path) const
pure virtual

This function appends a slash character to the end of the path passed unless one already exists.

Parameters
[in,out]pathThe path name to append. If NULL, no operation.

◆ RemoveSlash() [1/2]

virtual void RemoveSlash ( MCHAR path) const
pure virtual

This function removes the slash character from the end of the path passed if present.

Parameters
[in,out]pathThe path name to append. If NULL, no operation.

◆ AppendSlash() [2/2]

virtual void AppendSlash ( MSTR path) const
pure virtual

This function appends a slash character to the end of the path passed unless one already exists.

Parameters
[in,out]pathThe path name to append.

◆ RemoveSlash() [2/2]

virtual void RemoveSlash ( MSTR path) const
pure virtual

This function removes the slash character from the end of the path passed if present.

Parameters
[in,out]pathThe path name to append. If NULL, no operation.

◆ IsUsingProfileDirectories()

virtual bool IsUsingProfileDirectories ( ) const
pure virtual

Checks whether the application is configured to use User Profile directories.

Returns
true if the application is configured to use User Profile directories false if the application's system paths and configuration files are stored in the legacy location (i.e. under the install root)

◆ IsUsingRoamingProfiles()

virtual bool IsUsingRoamingProfiles ( ) const
pure virtual

Checks whether the application is configured to use roaming profiles.

Assuming that the application is configured to use User Profiles (see IsUsingProfileDirectories()) , determines whether paths are set to store information in the roaming profile location (i.e. /Documents and Data/<username>/Application Data...) or whether they are stored in the per-user Local Settings for the machine. (i.e. /Documents and Data/<username>/Local Settings/Application Data...)

Returns
true if the application is configured to use roaming profiles (moot if IsUsingProfileDirectory() returns true

◆ CreateDirectoryHierarchy()

virtual bool CreateDirectoryHierarchy ( const MaxSDK::Util::Path aPath) const
pure virtual

Creates a hierarchy of directories.

This method will ensure that a hierarchy of directories exists. For example, if Path object representing "C:/A/B/C/D" is passed to this method, then this method will create A, B, C, and D, if they do not exist.

Parameters
[in]aPathA Path object representing the directory hierarchy to create, if needed. This path must be absolute, and it's length cannot exceed 249 characters.
Returns
true if the directories are created successfully or if the path already exists, false if an error occured while creating the directory, or if the parameter does not conform to stated restrictions.
See also
MaxSDK::Util::Path

◆ DoesFileExist()

virtual bool DoesFileExist ( const MaxSDK::Util::Path aPath,
bool  ignoreMissingPathCache = false 
) const
pure virtual

Checks if a file or directory exists in the location pointed to by the absolute path parameter, potentially considering the missing file cache.

Checks for the existence of a file or directory pointed to by the absolute Path parameter.

Parameters
[in]aPathAn absolute path to check for existence. Note that the disk is accessed to check for its existence, so checking paths (especially on network drives) may incur a performance cost.
ignoreMissingPathCacheIf true, testing does not consider whether the file's path may be in the missing path cache.
Returns
true if the path is absolute and points to a file or directory that currently exists
See also
Class IMissingPathCache

◆ RecordInputAsset()

virtual void RecordInputAsset ( const MaxSDK::AssetManagement::AssetUser originalPath,
AssetEnumCallback nameEnum,
DWORD  vflags 
) const
pure virtual

Searches for the given path and records the path in the NameEnum according to its ability to resolve the path and if missing only is set in the flags.

Calls SearchForExternalFiles on the specified path, and if the path resolves to an existing file, and FILE_ENUM_MISSING_ONLY is not set, records the asset in the AssetEnumCallback. If the path is not resolved and the flags are set with FILE_ENUM_MISSING_ONLY, it records the original path in the callback.

This is intended to be the default asset registration policy for calls to EnumAuxFiles on input-only assets when not using IAssetAccessor.

Parameters
originalPathThe asset path as listed in the asset tracking system.
nameEnumThe AssetEnumCallback in which to register this asset.
vflagsIf FILE_ENUM_MISSING_ONLY is set, only paths that cannot be resolved to existing files will be recorded. If the FILE_ENUM_MISSING_ONLY is not set, only found files will be recorded.

◆ RecordOutputAsset()

virtual void RecordOutputAsset ( const MaxSDK::AssetManagement::AssetUser originalAsset,
AssetEnumCallback nameEnum,
DWORD  vflags 
) const
pure virtual

Converts the given path to absolute and records the path in the AssetEnum according to its ability to resolve the path and if missing only is set in the flags.

Calls Path.ConvertToAbsolute on the specified path, and if the path resolves to an existing file, and FILE_ENUM_MISSING_ONLY is not set, records the asset in the AssetEnumCallback. If the path is not resolved and the flags are set with FILE_ENUM_MISSING_ONLY, it records the original path in the callback.

This is intended to be the default asset registration policy for calls to EnumAuxFiles for write assets when not using IAssetAccessor.

Parameters
originalAssetThe asset as listed in the asset tracking system.
nameEnumThe AssetEnumCallback in which to register this asset.
vflagsIf FILE_ENUM_MISSING_ONLY is set, only paths that cannot be resolved to existing files will be recorded. If the FILE_ENUM_MISSING_ONLY is not set, only found files will be recorded.

◆ GetCurrentProjectFolder()

virtual const MaxSDK::Util::Path& GetCurrentProjectFolder ( ) const
pure virtual

Returns the current Project Folder folder.

Gets the current Project Folder setting in 3ds Max. This is the setting to which newly created relative paths are set relative to. Though this setting is also accessible by calling

static CoreExport IPathConfigMgr * GetPathConfigMgr()
Returns the single instance of this manager.
virtual const MCHAR * GetDir(int which) const =0
Returns the default directory for the specified ID.
#define APP_PROJECT_FOLDER_DIR
The ID used to access the root folder of the current system project.
Definition: MaxDirectories.h:234

it is highly recommended that this method be used to access this value.

Returns
The current Project Folder setting folder.

◆ SetCurrentProjectFolder()

virtual bool SetCurrentProjectFolder ( const MaxSDK::Util::Path aDirectory)
pure virtual

Sets the current Project Folder folder.

Sets the current Project Folder setting in 3ds Max. This is the setting to which newly created relative paths are set relative to. Though this setting can also be set by calling

virtual bool SetDir(int which, const MCHAR *dir)=0
Sets the default directory.

it is highly recommended that this method be used to change this value, as other steps to adjust the environment may be taken internally.

Parameters
[in]aDirectoryThe folder to which the Project Folder should be set. This value must be an absolute path. If the folder path does not exist, 3ds Max will attempt to create it.
Returns
Returns true if the folder is valid and absolute, or false otherwise

◆ SetSessionProjectFolder()

virtual bool SetSessionProjectFolder ( const MaxSDK::Util::Path aDirectory)
pure virtual

Sets a Project Folder which will be used for this application session only.

Sets a session-only path as the current Project Folder. This value does not persist if the application is shut down. The previous Project Folder setting will not be overwritten and will be the default setting upon future boot-ups. Calls to GetCurrentProjectFolder() will resolve to this session Project Folder, and relative paths will resolve themselves relative to this new value. The only difference is that this value is not persistent across sessions.

Parameters
[in]aDirectoryThe folder to which the Project Folder should be set. This value must be an absolute path.
Returns
Returns true if the folder is valid and absolute, or false otherwise
See also
SetCurrentProjectFolder(const MaxSDK::Util::Path&)

◆ DoProjectSetupSteps()

virtual bool DoProjectSetupSteps ( ) const
pure virtual

Initiates the steps to choose and setup a default 3ds Max project.

This call will initiate the workflow for allowing a user to choose and create a default project. In effect, this method will launch the "CreateDefaultProject" macroscript. The user will be prompted to browse to a new directory.

Returns
true if the steps succeeded and the user did not cancel the action Will return false immediately if the app is in Quiet Mode.

◆ DoProjectSetupStepsUsingDirectory()

virtual bool DoProjectSetupStepsUsingDirectory ( const MaxSDK::Util::Path aDirectory) const
pure virtual

Initiates the steps to set up a default 3ds Max project without prompting the user.

This call will initiate the workflow for setting up a default project. In effect, this method will launch the "CreateDefaultProject" macroscript. It will use the passed in parameter as the new Project Folder.

Parameters
[in]aDirectoryThe directory that will be the new root of the project. This path must be absolute.
Returns
true if the steps succeeded and the path is absolute

◆ DoSetProjectFolderSteps()

virtual bool DoSetProjectFolderSteps ( ) const
pure virtual

Initiates the steps to set an existing 3ds Max project folder as the active project folder.

This call will initiate the workflow for allowing a user to choose an existing 3ds Max project folder as the active project folder. In effect, this method will launch the "SetProjectFolder" macroscript. The user will be prompted to browse to an existing directory.

Returns
true if the steps succeeded and the user did not cancel the action Will return false immediately if the app is in Quiet Mode.

◆ DoSetProjectFolderStepsUsingDirectory()

virtual bool DoSetProjectFolderStepsUsingDirectory ( const MaxSDK::Util::Path aDirectory) const
pure virtual

Initiates the steps to set an existing 3ds Max project folder as the active project folder without prompting the user.

This call will set an existing 3ds Max project folder as the active project folder. In effect, this method will launch the "SetProjectFolder" macroscript. It will use the passed in parameter as the new Project Folder to set active.

Parameters
[in]aDirectoryThe directory that will be set as the active project folder. This path must be absolute.
Returns
true if the steps succeeded and the path is absolute

◆ IsProjectFolder()

virtual bool IsProjectFolder ( const MaxSDK::Util::Path aDirectoryToCheck) const
pure virtual

Will check for the existence of a project in a folder.

Given a folder path, will check if a project exists in that folder. A project exists if a .mxp file exists in that path.

Parameters
[in]aDirectoryToCheckAn absolute path to check for the existence of a project.
Returns
true if a project exists at the location specified by the passed -in parameter

◆ GetProjectFolderPath()

virtual MaxSDK::Util::Path GetProjectFolderPath ( const MaxSDK::Util::Path aProjectRoot) const
pure virtual

Will return the fully-qualified path of the project file, given the root folder of an existing project.

Given a project root of a project which exists, will return the .mxp file for that project. Normally the .mxp filename is the same name as the project root folder, but if that file does not exist, then the first file that matches the "*.mxp" pattern will be returned.

Parameters
[in]aProjectRootThe path of the root of a project to check.
Returns
The fully-qualified path of the project file. A project file is searched for, but if not found, then a file name is generated.

◆ GetCurrentProjectFolderPath()

virtual MaxSDK::Util::Path GetCurrentProjectFolderPath ( ) const
pure virtual

Returns the file path of the current project file, if it exists.

Gets the project file path of the current project, if it exists.

See also
GetProjectFilePath(const MaxSDK::Util::Path&) const
Returns
The fully-qualified path of the current project file. A project file is searched for, but if not found, then a file name is generated.

◆ MakePathRelativeToProjectFolder()

virtual void MakePathRelativeToProjectFolder ( MaxSDK::Util::Path aPath) const
pure virtual

Converts an absolute path into a path that is relative to the current Project Folder.

Converts an absolute path into a path that is relative to the current Project Folder. If the path cannot be made relative (if it is rooted on a different drive, for instance), then it is left untouched. A path parameter which already relative is also left untouched.

Parameters
[in,out]aPathA mutable absolute Path which will be converted to a relative path, if possible.
See also
MaxSDK::Util::Path
GetCurrentProjectFolder()

◆ GetProjectSubDirectoryCount()

virtual int GetProjectSubDirectoryCount ( ) const
pure virtual

Gets a count of the number of Project directories.

This method will return a count of the directories listed in the Configure User Paths... -> File IO dialog.

Returns
the number of Project directories

◆ GetProjectSubDirectory()

virtual const MCHAR* GetProjectSubDirectory ( int  aIndex) const
pure virtual

Returns a project directory according to an index, not an ID This method will return a Project directory by index, rather than by ID.

This is to allow an SDK user to iterate over the list of Project directories. The directories are sorted by Description and are ordered alphanumerically.

Parameters
[in]aIndexThe index value of the directory to return, which must be between 0 and GetProjectSubDirectoryCount()-1.
Returns
The directory associated by the index value, not by ID. if the input index is invalid, then NULL is returned

◆ AddProjectDirectoryCreateFilter()

virtual void AddProjectDirectoryCreateFilter ( int  aID)
pure virtual

Adds an ID to a persistent internal filter table.

Adds a File IO ID to an internal filter table that is referenced when creating a Project setup. Folders added to this list (by their ID) are NOT created when creating a Project workspace.

Parameters
[in]aIDAn ID for a folder to not include in the Project workspace creating process.
See also
GetDir(int)
DoProjectSetupSteps()
DoProjectSetupStepsUsingDirectory(const MaxSDK::Util::Path&)
MAX Directory IDs "MAX Directory IDs"

◆ RemoveAllProjectDirectoryCreateFilters()

virtual void RemoveAllProjectDirectoryCreateFilters ( )
pure virtual

Removes all IDs from a persistent internal filter table.

Removes all File IO IDs from an internal filter table that is referenced when creating a Project setup. Folders added to this list (by their ID) are NOT created when creating a Project workspace.

See also
AddProjectDirectoryCreateFilter(int)
GetDir(int)
DoProjectSetupSteps()
DoProjectSetupStepsUsingDirectory(const MaxSDK::Util::Path&)

◆ RemoveProjectDirectoryCreateFilter()

virtual void RemoveProjectDirectoryCreateFilter ( int  aID)
pure virtual

Removes an ID from a persistent internal filter table.

Removes a File IO ID from an internal filter table that is referenced when creating a Project setup. Folders added to this list (by their ID) are NOT created when creating a Project workspace.

Parameters
[in]aIDAn ID for a folder to not include in the Project workspace creating process.
See also
AddProjectDirectoryCreateFilter(int)
GetDir(int)
DoProjectSetupSteps()
DoProjectSetupStepsUsingDirectory(const MaxSDK::Util::Path&)
MAX Directory IDs "MAX Directory IDs"

◆ GetProjectDirectoryCreateFilters()

virtual void GetProjectDirectoryCreateFilters ( Tab< int > &  filterIDs)
pure virtual

Returns a Tab of the IDs in the persistent internal filter table.

Gets the IDs from the persistent internal filter table.

Parameters
[out]filterIDsTab containing the IDs from the persistent internal filter table.

◆ GetPathConfigMgr()

static CoreExport IPathConfigMgr* GetPathConfigMgr ( )
static

Returns the single instance of this manager.

Gets the single instance of this class.

Returns
The single instance of this class.