Interface: defaultActions

Interfaces > Core Interfaces > defaultActions

The defaultActions CoreInterface exposes the default actions for several system events.

Available in 3ds Max 2008 and higher.

   

Interface: defaultActions 

Methods:

<boolean>defaultActions.getAction <enum>eventID <&enum array>action   

eventID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 
action enums: {#logToFile | #logmsg | #abort} 
action is Out parameter 

Get the default actions with the event ID given as first argument into the by-reference second argument.

Returns true on success, false if no actions were found for the given ID.

   

<boolean>defaultActions.setAction <enum>eventID <&enum array>action title:<string> oldAction:<&enum array> 

eventID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 
action enums: {#logToFile | #logmsg | #abort} 
action is In parameter 
title default value: undefined 
oldAction enums: {#logToFile | #logmsg | #abort} 
oldAction default value: #() 
oldAction is Out parameter 

Set the default actions with the event ID given as first argument to the actions specified by the second argument.

The optional title: string can be used to give a name to the action setup.

The old actions will be returned into the optional oldAction: argument.

Returns true if an old action was found, false if no old action was previously defined for this ID.

EXAMPLE:

--get the default action for missing UVW:
defaultActions.getAction #missingUVW &actions
false
actions --see the result - there are no actions defined
#()
--now set the default action to Log to File:
defaultActions.setAction #missingUVW #(#logToFile) oldAction:oldActionsArray
true
oldActionsArray --see what the previous actions were
#()
--check to see if the new actions are defined:
defaultActions.getAction #missingUVW &actions
true
actions --yes, the default action was set correctly
#(#logToFile)

   

<boolean>defaultActions.deleteAction <enum>eventID 

eventID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 

Deletes the default actions for the event ID given as first argument.

Returns true on success, false if no actions were found to delete.

EXAMPLE (CONTINUED FROM PREVIOUS EXAMPLE):

--get the default action for missing UVW:
defaultActions.deleteAction #missingUVW
true
defaultActions.getAction #missingUVW &actions
false
actions --see the content of the actions array - there are none
#()

   

<integer>defaultActions.getActionCount() 

Returns the number of default actions.

   

<Stringby value>defaultActions.getActionTitle <enum>eventID 

eventID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 

Returns the title of the action defined for the given event ID, or empty string "" if no title has been defined.

   

<Stringby value>defaultActions.getActionTitleByIndex <index>index 

Returns the title of the action by index, or empty string "" if no title has been defined.

   

<enum>defaultActions.getActionIDByIndex <index>index 

getActionIDByIndex enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 

Returns the Action ID by index.

   

<boolean>defaultActions.logEntry <enum>eventID <string>message 

eventID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 

Logs the message given by the second argument for the event ID given by the first argument. Returns true on success, false otherwise.

   

<void>defaultActions.MsgLogClear <enum>eventID 

eventID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 

Clears the messages for the event ID given by the first argument.

   

<integer>defaultActions.getMsgLogCount <enum>eventID 

eventID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 

Returns the message count for the event ID given by the first argument.

   

<TSTR by value>defaultActions.getMsgLogMsg <enum>eventID <index>index 

eventID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 

Returns the indexed message logged for the event ID given by the first argument.

   

<TSTR by value array>defaultActions.getMsgLogMsgs <enum>eventID 

eventID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 

Returns an array of all message for the event ID given by the first argument.

   

<enum>defaultActions.getMsgLogID <index>index 

getMsgLogID enums: {#missingExtFiles | #missingDLLs | #missingXRefs | #missingUVW | #unsupportedRendereffect | #invalidXRefFiles} 

Returns the Log ID for the indexed message given by the first argument.

   

<integer>defaultActions.setMsgLogMaxCount <integer>count 

Sets the maximum number of messages in the message log.