MAXScript Extensions > MAXScript Extensions for Reactor >

# Interface: reactorInterface

The Reactor dynamics system has been retired and REMOVED from 3ds Max 2012.

The reactorInterface was exposed by theReactorUtility. To access the properties and methods described below, you could use reactor.property .

You do not have to explicitly state the interface like reactor.reactorInterface.property - MAXScript will scan the utilityPlugin and its interfaces and locate the property automatically.

    Interface: reactorInterface

Properties:

    reactor.gravity : point3 by value : Read|Write

Get/set the Gravity vector

    reactor.collisionTolerance : float : Read|Write

Get/set the Collision Tolerance value

    reactor.worldScale : float : Read|Write

Get/set the World Scale value

    reactor.useDragAction : boolean : Read|Write

Controls the state of the "Add Drag Action" checkbox in the "World" rollout.

    reactor.linearDrag : float : Read|Write

Get/set the Linear Drag value. Used when .useDragAction is set to True.

    reactor.angularDrag : float : Read|Write

Get/set the Angular Drag value. Used when .useDragAction is set to True.

    reactor.simulateFriction : boolean : Read|Write

When set to True,Reactorwill simulate friction.

NoteThe value is the inverse of the "Do Not Simulate Friction" checkbox in the "World" rollout. When .simulateFriction is set to False , the checkbox will be checked and vice-versa.

    reactor.addDeactivator : boolean : Read|Write

Controls the state of the "Add Deactivator" checkbox in the "World" rollout.

    reactor.deactivatorShortFrequency : float : Read|Write

Get/set the Short Frequency value used by the Deactivator.

    reactor.deactivatorLongFrequency : float : Read|Write

Get/set the Long Frequency value used by the Deactivator.

    reactor.analyzeBeforeSimulation : boolean : Read|Write

Controls the state of the "Analyze Before Simulation" checkbox in the "Utils" rollout. When set to True , the Scene will be analyzed before performing the Simulation.

    reactor.backupBeforeSimulation : boolean : Read|Write

Controls the state of the "Save Before Simulation" checkbox in the "Utils" rollout. When set to True , the Scene will be saved before performing the Simulation.

    reactor.reductionThreshold : float : Read|Write

Get/set the Reduction Threshold value of the Simulation. Corresponds to the spinner value located in the "Key Management" group of the "Utils" rollout.

    reactor.reduceAfterSimulation : boolean : Read|Write

Controls the state of the "Reduce After Simulation" checkbox located in the "Key Management" group of the "Utils" rollout. When set to True , the Keyframes will be reduced after the Simulation has been performed.

    reactor.startFrame : integer : Read|Write

Get/set the Start Frame value of the Simulation. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

    reactor.endFrame : integer : Read|Write

Get/set the End Frame value of the Simulation. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

    reactor.substeps : integer : Read|Write

Get/set the Substeps per Key value. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

    reactor.framesPerKeyframe : integer : Read|Write

Get/set the Frames per Key value. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

    reactor.timeScale : float : Read|Write

Get/set the Time Scale value. Corresponds to the spinner value located in the "Timing" group of the "Preview & Animation" rollout.

    reactor.updateViewports : boolean : Read|Write

Controls the state of the "Update Viewports" checkbox in the "Preview & Animation" rollout. When set to True , the Keyframes will be reduced after the Simulation has been performed.

    reactor.camera : node : Read|Write

Get/set the Camera node used for display. Corresponds to the pickbutton located in the "Display" rollout.

    reactor.useDefaultCameraClippingPlanes : boolean : Read|Write

Controls the state of the "Use Defaults" checkbox in the "Camera Clipping Planes" group in the "Display" rollout. When set to True , the Clipping Planes of the selected Camera will be used. When set to False , the Clipping values defined by .nearCameraClippingPlane and .farCameraClippingPlane will be used istead.

    reactor.nearCameraClippingPlane : float : Read|Write

Get/set the Near Plane value. Corresponds to the spinner value located in the "Camera Clipping Planes" group of the "Display" rollout.

    reactor.farCameraClippingPlane : float : Read|Write

Get/set the Far Plane value. Corresponds to the spinner value located in the "Camera Clipping Planes" group of the "Display" rollout.

    reactor.mouseSpringRestitution : float : Read|Write

Get/set the Mouse Spring Restitution value. Corresponds to the "Stiffness" spinner value located in the "Mouse Spring" group of the "Display" rollout.

    reactor.mouseSpringRestLength : float : Read|Write

Get/set the Mouse Spring Restitution Length value. Corresponds to the "Rest Length" spinner value located in the "Mouse Spring" group of the "Display" rollout.

    reactor.mouseSpringDamping : float : Read|Write

Get/set the Mouse Spring Damping value. Corresponds to the "Damping" spinner value located in the "Mouse Spring" group of the "Display" rollout.

    reactor.textureQuality : integer : Read|Write

Get/set the Texture Quality. Corresponds to the radio button state in the "Texture Quality (pixels)" group of the "Display" rollout.

Possible values are

0 - 64x64 pixels

1 - 128x128 pixels

2 - 256x256 pixels

3 - 512x512 pixels

    reactor.lights : node by value array : Read|Write

Get/set the array of lights to be used by the interactive display. Corresponds to the list in the "Display" rollout.

    reactor.displayUsingDirectX : boolean : Read|Write

Controls the state of the "DirectX" checkbox in the "Display" rollout.

    reactor.storeCollisionInfoMethod : integer : Read|Write

Get/set the method for storing the Collision Information. Corresponds to radio buttons located in the "Store Collisions" group in the "Collisions" rollout.

Possible values are:

0 - Do not store

1 - Store once

2 - Always store

    reactor.filterBodiesForCollisionInfo : boolean : Read|Write

When set to true, collision info will be filtered. (See getFilteredCollisionPairsLists method below for access)

    reactor.filterVelocitiesForCollisionInfo : boolean : Read|Write

When set to true, collision velocity info will be filtered.

    reactor.minFilterVelocityForCollisionInfo : float : Read|Write

Get/set the min.velocity threshold for a collision info to be considered for filtering.

    reactor.createListLayer : boolean : Read|Write

Get/set the state of the "Create List/Layer" checkbox in the "Preview & Animation" rollout.

Methods:

    <void>reactor.PreviewAnimation()

Presses the Preview in Window button located in the "Preview & Animation" rollout.

    <void>reactor.AnalyzeWorld()

Presses the "Analyze World" button located in the "Utils" rollout, "World Analyzis" group

    <void>reactor.ShowAbout()

Presses the "About " button located in the "About" rollout (? Icon)

    <void>reactor.TestSelectedConvexity()

Presses the "Test Convexity" button located in the "Utils" rollout, "Selection group".

    <boolean>reactor.GetIsConvex <node>bodyNode <time>time

Returns true if the specified node is convex at the specified time, false otherwise.

    <void>reactor.CreateAnimation <boolean>quietCreate

Presses the "Create Animation" button located in the " Preview & Animation" rollout.

    <void>reactor.ReduceKeysForSelectedObjects()

Presses the "Reduce Keys" button located in the "Utils" rollout, "Selection group".

    <void>reactor.DeleteKeysForSelectedObjects()

Presses the "Delete Keys" button located in the "Utils" rollout, "Selection group".

    <void>reactor.ReduceKeysForAllObjects()

Presses the "Reduce Now" button located in the "Utils" rollout, "Key Management".

    <void>reactor.DeleteKeysForAllObjects()

Presses the "Delete All" button located in the "Utils" rollout, " Key Management".

    <IObject>reacto.getRigidObject <node>bodyNode

Returns arigidBodyInterfaceMixinInterface for the specified node.

The following methods are related to collision information access.

    <integer>reactor.getNumStoredCollisions()

Returns the number of stored collisions

    <maxObject by value array>reactor.getStoredCollisions()

Returns all stored collisions as an array ofCollision_Info : ReferenceTargetobjects.

    <void>reactor.setStoredCollisions <maxObject by value array>newCollisions

Set the stored collisions to the specified array.

    <void>reactor.addCollisions <maxObject by value array>newCollisions

Add the specified array to the stored collisions.

    <void>reactor.clearStoredCollisions()

Clear the stored collisions.

    <boolean>reactor.saveStoredCollisions <string>path <string>filename

Save the stored collisions to the specified path and file name. Returns true on success.

    <void>reactor.getFilteredCollisionPairsLists <&node array>firstObjects <&node array>secondObjects

    firstObjects is In and Out parameter
    secondObjects is In and Out parameter

Returns filtered collision pairs into the two by-reference arrays. Elements from both arrays with the same index correspond to a collision pair.

    <void>reactor.setFilteredCollisionPairsLists <&node array>firstObjects <&node array>secondObjects

    firstObjects is In and Out parameter
    secondObjects is In and Out parameter

Sets the filtered collision pairs lists to the two by-reference arrays. Elements from both arrays with the same index correspond to a collision pair.

    <void>reactor.getDisabledCollisionPairsLists <&node array>firstObjects <&node array>secondObjects

    firstObjects is In and Out parameter
    secondObjects is In and Out parameter

Returns disabled collision pairs lists into the two by-reference arrays. Elements from both arrays with the same index correspond to a collision pair.

    <void>reactor.setDisabledCollisionPairsLists <&node array>firstObjects <&node array>secondObjects

    firstObjects is In and Out parameter
    secondObjects is In and Out parameter

Sets the disabled collision pairs lists to the two by-reference arrays. Elements from both arrays with the same index correspond to a collision pair.

    <void>reactor.enableCollisions <node>objectA <node>objectB

Enable collisions between the two specified objects.

    <void>disableCollisions <node>objectA <node>objectB

Disable collisions between the two specified objects.

#### See Also

- MAXScript Extensions for Reactor

- Interface: rigidBodyInterface

- Interface: primitiveInterface

- Collision_Info : ReferenceTarget