maxOps

There are many new MAXScript functions exposed in maxops:

maxOps.setActiveViewportTransparencyDisplay

Takes a single integer argument:

0: turns off transparency in the active viewport

1: sets it to screendoor

2: sets it to blended transparency.

maxOps.setSelectionType <boolean> <integer>

true 1: Enables auto Win/Cross: moving left-to-right is crossing selection

true 0: Enables auto Win/Cross: moving right-to-left is crossing selection

false 1: Disables auto Win/Cross, turns ON crossing selection

false 0: Disables auto Win/Cross, turns OFF crossing selection

The integer relates to the radiobutton index in Customize/Preferences.

maxOps.productVersion

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.isNetworkLicense

The property is read-only, with a boolean value: true means a network license, false means a local license.

maxOps.licenseBehavior

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

maxOps.licenseDaysLeft

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.

Note: It should be noted that the all copies of 3ds max return a hardwarelockid of "-1" while under the grace period and until they have been authorized. You can check for that number and initiate your own demo mode .

Example:

This example displays the values of your Cdilla license.

rollout CdillaOPS "License Properties" width:220 height:270

(

groupBox grp1 "License Values" pos:[18,18] width:180 height:265

button btn5 "Days until Expiration" pos:[50,45] width:119 height:18

editText edt5 "" pos:[50,75] width:119 height:18

button btn6 "License Version" pos:[50,105] width:119 height:18

editText edt6 "" pos:[50,135] width:119 height:18

button btn7 "License Behavior" pos:[50,165] width:119 height:18

editText edt7 "" pos:[50,195] width:119 height:18

button btn8 "Hardware Lock ID" pos:[50,225] width:119 height:18

editText edt8 "" pos:[50,255] width:119 height:18

on btn5 pressed do

edt5.text = (maxOps.licenseDaysLeft as string)

on btn6 pressed do

(

version = maxOps.productVersion as string

edt6.text = substring version 15 version.count

)

on btn7 pressed do

(

version = maxOps.licenseBehavior as string

edt7.text = substring version 16 version.count

)

on btn8 pressed do

edt8.text = (hardwarelockid as string)

)

rof = newRolloutFloater "License_Status" 230 380

addRollout CdillaOPS rof

maxOps.getNodeByHandle

Returns the node associated with the id passed in.

maxOps.setSelectionType <auto> <method>

<auto>

True or False

<method>

Valid values or method are #window, #crossing, #leftToRight, #rightToLeft. #window or #crossing is to be used if the first argument (auto) is false. #leftToRight or #rightToLeft is to be used when auto is true.

maxOps.trackBar

maxOps.getTrackBar()

maxOps.trackBar.visible

maxOps.trackBar.filter

maxOps.trackBar.showFrames

maxOps.trackBar.showAudio

maxOps.trackBar.showSelectionRange

maxOps.trackBar.showSnapToFrames

maxOps.trackBar.keyTransparency

maxOps.trackBar.selKeyTransparency

maxOps.trackBar.cursorTransparency

maxOps.trackBar.redraw()

maxOps.trackBar.getNextKeyTime()

maxOps.trackBar.getPreviousKeyTime()

maxOps.cloneNodes

Note: The following properties require a redraw, but in some cases hiding and unhiding the trackbar gives a better result.

maxOps.trackBar.showFrames

maxOps.trackBar.showAudio

maxOps.trackBar.showSelectionRange

maxOps.trackBar.showSnapToFrames

Example:

tbar = maxops.trackbar

tbar.showframes = false

tbar.redraw()        -- Notice the result so far

tbar.visible = false

tbar.visible = true  -- Notice the difference

CloneNodes <&node array>nodes offset: <point3> expandHierarchy:<boolean> cloneType:<enum> actualNodeList:<node array> newNodes:<node array>

nodes is In parameter

This is the list of nodes that you want to clone.

offset is In parameter

The positional offset that will be applied to the cloned nodes.

expandHierarchy default value: false

Indicates if children will be cloned in hierarchies. Default is false.

cloneType enums: {#copy|#instance|#reference}

default value: #copy

actualNodeList default value: #()

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.

newNodes default value: #()

This node array will be filled in with the new cloned nodes. There is a one to one relationship between the nodes in the resultSource and the resultTraget.

This method will return true if successful, otherwise it will return false.

maxOps.CollapseNode node noWarnings

maxOps.CollapseNodeTo node modIndex noWarnings

See also