Interfaces > Core Interfaces > maxOps |
This Core Interface exposes various 3ds Max system properties and methods to MAXScript.
Topic Navigation | |
---|---|
Window/Crossing Selection Type |
The enum values returned are as follows:
Returns the 3ds Max "flavour".
The enum values returned are as follows:
#3dsMax - 3ds Max Entertainment Version
#3dsMaxDesign - 3ds Max Design Version
Available in 3ds Max 2010 and higher.
maxOps.productVersion : enum : Read productVersion enums: {#productVersionDevel|#productVersionTrial|#productVersionOrdinary|#productVersionEdu|#productVersionNFR}
Returns the Product Version type.
The enum values returned are as follows:
#productVersionDevel - debug build, or licensed in-house
#productVersionTrial - trial license
#productVersionOrdinary - commercial license
#productVersionNFR - not for resale
#productVersionEdu - educational or student license
maxOps.licenseBehavior : enum : Read licenseBehavior enums: {#licenseBehaviorPermanent|#licenseBehaviorExtendable|#licenseBehaviorNonextendable}
The enum values returned are as follows:
#licenseBehaviorPermanent - permanent license, or hardware lock
#licenseBehaviorExtendable - term license, can be extended
#licenseBehaviorNonextendable - term license, cannot be extended
Its return value is an integer indicating the number of full days left in the term of the license. A value of 0 means that today is the last day of validity. For permanent licenses, a fixed value is returned indicating greater than 10 years are left.
The property is read-only, with a boolean value: true means a network license, false means a local license.
Returns true if the given feature is licensed, false otherwise.
Contains the Trackbar Interface.
When set to true, new procedural controllers that normally require a range will be set to infinite range. When set to false (default behavior prior to 3ds Max 8), the range of such controllers will be set explicitly to the current animation range, causing the controllers to stop updating after the last frame of the range should the scene animation range be increased later. Available in 3ds Max 8 and higher.
Get/set Spring Quick Edit mode on and off. Corresponds to the checkbox in the Animation tab of the Preferences dialog.
Get/set the Spring Controller's Rolling Start value. Corresponds to the Rollback value in the Animation tab of the Preferences dialog.
Returns the interface to the trackbar. See Trackbar Interface for details.
Returns true if 3ds Max is in Progressive mode, false otherwise.
When a time sequence of matrices is computed and has to be assigned to the transformation matrix of a node that employs the standard PRS controller and the standard Euler XYZ controller for the rotation, we would achieve a better animation result if the euler angles for the current frame were calculated based on the angles from the previous frame. The Progressive Mode tells the Euler controller to derive angles based on the previous frame. It is assumed that in this mode, the node transformation is set in strictly forward time order.
Also see beginProgressiveMode() and endProgressiveMode() methods below.
Enables Progressive mode. See also maxOps.inProgressiveMode property above.
Disables Progressive mode. See also maxOps.inProgressiveMode property above.
Enable/Disable the AutoGrid option.
Enable/Disable the Start New Shape option checkbox.
maxOps.pivotMode : enum : Read|Write pivotMode enums: {#none | #pivotOnly | #objectOnly | #hierarchyOnly}
This property corresponds to the pivot buttons in the Pivot subpanel of the Hierarchy Panel.
When set to true , the Hierarchy tab of the Command Panel will be switched to Trajectories mode.
When set to false , the Hierarchy tab of the Command Panel will be switched to Parameters mode.
If the Command Panel is not in the Hierarchy tab, it will be switched to it automatically.
Available in 3ds Max 2008 and higher.
When set to true , the Trajectories mode will be switched to Key Sub-Object mode.
If the Command Panel is not in the Hierarchy tab, it will be switched to it automatically.
If the Hierarchy has not been set to Trajectories mode by setting maxops.trajectoryMode=true or by manually switching with the mouse , it will be set to Trajectories mode automatically.
Available in 3ds Max 2008 and higher.
When set to true, the Add Key mode in the Trajectories rollout of the Hierarchy tab of the Command Panel will be turned on. When false, it will be turned off.
If the Command Panel is not in the Hierarchy tab, it will be switched to it automatically.
If the Hierarchy has not been set to Trajectories mode by setting maxops.trajectoryMode=true or by manually switching with the mouse , it will be set to Trajectories mode automatically.
If the Trajectories mode is not in Key Sub-Object mode by setting maxops.trajectoryKeySubMode=true or by manually switching with the mouse, the Sub-Object mode will be set automatically.
Available in 3ds Max 2008 and higher.
Deletes the selected trajectory key. Available in 3ds Max 2008 and higher.
Gets/Sets the state of the Hide Frozen Objects checkbox in the Display tab.
Get/set the SetKey Suspend mode state
maxOps.setKeyFilters : enum by value array : Read setKeyFilters enums: {#all | #position | #rotation | #scale | #ikParams | #objParams | #custAttribs | #modifiers | #materials|#other}
Always returns the fixed list of the filter names.
Returns an array of node sets.
Returns "" if the current setKey node set is "Selected", setting it to "" sets the current setKey node set to "Selected".
This method returns true if Set Key mode is active, false if not active.
maxOps.getSetKeyFilterState <enum>filter filter enums: {#position | #rotation | #scale | #ikParams | #objParams | #custAttribs | #modifiers | #materials}
Returns the state of the specified SetKey filter.
maxOps.setSetKeyFilterState <enum>filter <bool>onOff filter enums: {#position | #rotation | #scale | #ikParams | #objParams | #custAttribs | #modifiers | #materials}
Sets the state of the specified SetKey filter.
<void>maxOps.getDefaultTangentType<&enum>dfltInTangentType <&enum>dfltOutTangentType dfltInTangentType enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat} dfltInTangentType is Out parameter dfltOutTangentType enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat} dfltOutTangentType is Out parameter
Returns the default In and Out tangent types into the two Out parameters passed by-reference.
Available in 3ds Max 8 and higher.
<void>maxOps.setDefaultTangentType <enum>dfltInTangentType <enum>dfltOutTangentType writeInCfgFile:<boolean> dfltInTangentType enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat} dfltOutTangentType enums: {#smooth|#linear|#step|#fast|#slow|#custom|#flat} writeInCfgFile default value: true
Sets the default In and Out tangent types. When writeInCfgFile: is set to true (default), the changes will also be recorded in the configuration file, making them sticky between 3ds Max sessions.
Available in 3ds Max 8 and higher.
When this option is set to true (default), creating a key in AutoKey mode on a frame other than the one specified by maxops.autoKeyDefaultKeyTime will create a key on the frame specified by maxops.autoKeyDefaultKeyTime with the initial value of the animated property. This is the default behavior of 3ds Max since its first release.
When this option is set to false , no key other than the one on the current frame will be created by the AutoKey feature.
Available in 3ds Max 2008 and higher.
When maxops.autoKeyDefaultOn is set to true , a key will be created automatically on the frame defined by this time value.
Get/Set the size of the Paint Selection brush. The Paint Selection is a selection mode accessible through the Selection Region flyout. The value corresponds to the "Paint Selection Brush Size" value under Customize>Preferences>General>Scene Selection. Note that right-clicking the Paint Selection icon in the main toolbar will open the Preferences dialog.
Returns true if a bitmap importer is present for the extension in the file name, false otherwise. Does not check to see if the file exists or if it is a valid bitmap file.
If the active view is a Camera view and a multi-pass effect is turned on in the camera's properties, then this function returns true . Otherwise it does nothing and returns false .
Takes a single integer argument:
0 - turns off transparency in the active viewport
2 - sets it to blended transparency.
Returns an <IObject:ViewportShadingSettings> object exposing several interfaces related to advanced viewport shading controls.
See Viewport Shading Settings for details.
Available in 3ds Max 2010 and higher.
Get/set the Iterative Rendering mode in 3ds Max 2009 and higher.
When set to true , only the current frame will be rendered and no file will be saved to disk.
When set to false , the Render Dialog settings for Time Output and File Saving will be respected (this is the default and the only behavior in releases prior to 3ds Max 2009).
Returns the current render element manager.
Gets a specific render element manager.
Controls the number of digits appended as suffix to the name of newly created scene nodes, layers etc.
Available in 3ds Max 2011 and higher.
In 3ds Max 2011, the default value was changed from 2 to 3 and is now controlled by the "NameSuffixLength" key in the [Preferences] category of the 3dsmax.ini file.
This is to ensure better sorting of up to 999 objects using the MAXScript sort() method. If you intend to work with more than 1000 objects, you can increase the maxOps.nameSuffixLength value to 4 or more to ensure enough leading zeros.
In addition, note that newly created nodes will receive a number one higher than the highest number in the scene without filling gaps. For example. if you create objects Box001, Box002 and Box003 and delete Box002, the next automatically named object will have the name Box004 and not Box002.
Collapses the complete modifier stack of the node.
When noWarning is set to true, no prompt will be issued. Returns true if successful and false otherwise.
Collapses the modifier stack up to the indexed modifier.
The modifiers are counted from top of the stack. All modifiers below and INCLUDING the specified one will be collapsed.
When noWarning is set to true, no prompt will be issued.
Returns true if successful and false otherwise.
<bool>maxOps.CloneNodes <&node array>nodes offset:<point3> expandHierarchy:<boolean> cloneType:<enum> actualNodeList:<node array> newNodes:<node array>
This method will return true if successful, otherwise it will return false .
This is the list of nodes that you want to clone. nodes is In parameter.
The positional offset that will be applied to the cloned nodes. offset is In parameter.
Indicates if children will be cloned in hierarchies.
Specifies the clone type - Copy, Instance or Reference.
This node array will be filled in with the original nodes to be cloned. The reason for this is that there can be dependencies between nodes that causes other nodes to be added to the list. For example light/camera targets, nodes part of systems, part of groups or expanded hierarchies etc.
This node array will be filled in with the new cloned nodes. There is a one to one relationship between the nodes returned in the actualNodeList array and the newNodes array.
actualNodeList and newNodes take an argument of <&node array>, and are Out parameters. This is important because:
1) the variables should be passed by reference, and
2) we don't need to initialize the variables to arrays since they are only Out parameters (MAXScript doesn't try to convert the value passed in to an array).
Also note that the first argument type is specified as <&node array>nodes , In parameter. Since it is an In parameter, we know that the method does not change the contents of the array passed, so there is no point in passing this array by reference.
In addition, MAXScript automatically wraps the single argument passed into a temporary array, so we can use s instead of #(s) to supply the node array.
maxOps.setSelectionType <boolean>auto <enum>method method enums: {#window|#crossing|#leftToRight|#rightToLeft}
Controls the window/crossing modes of the selection tool.
When the first argument is set to true, it enables the Customize>Preferences>General tab>Auto Window/Crossing By Direction option. The second argument can be either 0 or 1 or the equivalent enums #leftToRight and #rightToLeft.
When the first argument is set to false, it sets the state of the Window/Crossing icon in the Main Toolbar, while disabling the Customize>Preferences>General tab>Auto Window/Crossing By Direction. The second argument can be either 0 or 1 or the equivalent enums #window and #crossing.
true 1 : Enables auto Window/Crossing: moving left-to-right is crossing selection
true 0 : Enables auto Window/Crossing: moving right-to-left is crossing selection
false 1 : Disables auto Window/Crossing, turns ON crossing selection
false 0 : Disables auto Window/Crossing, turns OFF crossing selection
Returns a specific color for each unique ID passed. The result is written to the Out parameter by reference.
This method is used internally to generate colors representing Material and Object IDs in the respective RenderElements.
Available in 3ds Max 8 and higher.
<void>maxOps.findNodes <&node array>templateNodes <&node array>foundNodes nodePropsToMatch:<&enum array> templateNodes is In parameter foundNodes is Out parameter nodePropsToMatch enums: {#nodePropMaterial|#nodePropLayer} nodePropsToMatch default value: #() nodePropsToMatch is In parameter
Finds nodes similar to the ones specified in the template. Optionally matches material and layer properties.
Available in 3ds Max 2008 and higher.
Get/set the Material Editor Mode in 3ds Max 2011 and higher.
If a Material Editor is already open, setting this property immediately switches the Editor to the given mode.
#basic(0) - Compact Material Editor mode
#advanced(1) - Slate Material Editor mode
See also the MatEditor - Open and Close the Material Editor topic for more related methods.
The maxOps.mtlDlgMode property described above is also available through the MatEditor struct for convenience.