Interfaces > Core Interfaces > NitrousGraphicsManager |
This Core Interface exposes the Nitrous Graphics Manager to MAXScript.
Available in 3ds Max 2012 and higher.
NitrousGraphicsManager.MakePreviewQuality : integer : Read|Write
NEW in 3ds Max 2013: Get/set the number of progressive refinement passes to be performed when generating a preview animation using the Make Preview
feature of 3ds Max.
See also the createPreview Method topic for details on controlling the Make Preview feature via MAXScript.
NitrousGraphicsManager.MultiThreadedShaderCompileMode : bool : Read|Write
NEW in 3ds Max 2013: Get/set whether the compiling of shaders will use multiple threads (True) or a single thread (False).
NitrousGraphicsManager.ChangeCursorOnMouseMove : bool : Read|Write
NEW in 3ds Max 2013: Get/set whether to change the cursor on mouse move.
When set to True (default), the mouse cursor will change its icon to represent the current mode when over an object and return to an arrow when no object is found underneath.
When set to False, the mouse cursor will remain an arrow and will not change when over an object. Tooltips will still be displayed and hit-testing will be performed on left mouse click.
Returns a <IObject:ViewportViewSettingImpl> object which exposes the Interface to access the settings of the active viewport.
See further of this page for details.
Returns a <IObject:ViewportViewSettingImpl> object which exposes the settings of the specified indexed viewport.
See further of this page for details.
Returns True if the Nitrous Graphics system is enabled, False otherwise.
<bool>NitrousGraphicsManager.ProgressiveRendering()
NEW in 3ds Max 2013: Triggers progressive rendering.
Returns True on success, False of failure.
<bool>NitrousGraphicsManager.IsProgressiveRenderingFinished()
NEW in 3ds Max 2013: Returns True of the progressive refinement for the current frame has finished, False otherwise.
<bool>NitrousGraphicsManager.SetTextureSizeLimit <integer>sizeLimit <bool>enabled
Sets the Nitrous Graphics System's texture size limit.
The first argument specifies the texture size limit in pixels.
The second argument controls the enabled state of the texture size limit - when passed as True, the limit will be enabled, when passed as False, it will be disabled.
Returns True on success, False on failure.
<bool>NitrousGraphicsManager.SetBackgroundTextureSizeLimit <integer>sizeLimit <bool>enabled
Sets the Nitrous Graphics System's background texture size limit.
The first argument specifies the texture size limit in pixels.
The second argument controls the enabled state of the texture size limit - when passed as True, the limit will be enabled, when passed as False, it will be disabled.
Application Window Size and Position
<bool>NitrousGraphicsManager.SetAppWindowSize <integer>width <integer>height
NEW in 3ds Max 2013: Sets the 3ds Max application window size to the given width and height arguments.
Note that this will affect the 3ds Max window even if it is Maximized.
Returns True on success, False of failure.
<bool>NitrousGraphicsManager.SetAppWindowPos <integer>x <integer>y
NEW in 3ds Max 2013: Sets the position of the upper left corner of the 3ds Max application window to the given x and y coordinates in desktop
space.
Note that this will affect the 3ds Max window even if it is Maximized.
The following methods are for internal testing and profiling use only.
Starts collecting performance profiling data. For internal use only.
Ends collecting performance profiling data. For internal use only.
<Integer64>NitrousGraphicsManager.GetSystemMemoryUsed()
NEW in 3ds Max 2013: Returns the Nitrous System memory usage in bytes as Integer64 value.
Writes the current Nitrous Graphics system memory usage to a default file in the root of the 3ds Max installation. For internal use only.
Writes the current Nitrous Graphics system memory usage to the log file specified by the second argument. The first argument is the name of the 3ds Max scene. For internal use only.
Creates a number of dummy objects in memory using the class name provided as first argument and the count provided as second argument. For internal use only.
<bool>NitrousGraphicsManager.RunMessageLoop()
NEW in 3ds Max 2013: Runs the Nitrous system message loop. For internal use only.
Returns True on success, False of failure.
<void>NitrousGraphicsManager.BeginPartialUpdateCompareTest()
NEW in 3ds Max 2013: Starts the partial update compare test. For internal use only.
<void>NitrousGraphicsManager.EndPartialUpdateCompareTest()
NEW in 3ds Max 2013: Ends the partial update compare test. For internal use only.
<bool>NitrousGraphicsManager.GetPartialUpdateCompareTestResult()
NEW in 3ds Max 2013: Returns True if the partial update compare test succeeded, False if it did not pass. For internal use only.
<bool>NitrousGraphicsManager.ApplyViewportViewSettingToLegacyView <integer>index
NEW in 3ds Max 2013: For internal use only.
Viewport Settings IObject Interfaces:
The interface is exposed by the IObject returned by the methods NitrousGraphicsManager.GetActiveViewportSetting() and NitrousGraphicsManager.GetViewportSetting()
It exposes the viewport settings as seen in the "Visual Style & Appearance" tab of the "Viewport Configuration" dialog.
In addition, it provides scripted access to the parameters of the Non-Photorealistic Rendering styles and Viewport's Depth Of Field Bokeh effect introduced in 3ds Max 2013 which are not exposed to the User Interface.
Visual Style group of controls
<ViewportViewSettingImpl>.VisualStyleMode : enum : Read|Write VisualStyleMode enums: { #Realistic | #Shaded | #ConsistentColors | #HiddenLine | #Wireframe | #BoundingBox | #Clay | #Ink | #ColorInk | #Acrylic | #Tech | #Graphite | #ColorPencil | #Pastel }
Get/set the Viewport's Visual Style, including realistic, shaded and non-photorealistic modes. The property can be set as enum name or integer value. When getting, it will return the enum name.
Get/set the state of the "Edged Faces" viewport option.
When set to False (default), no edged faces will be displayed.
When set to True, a wireframe representation of the geometry faces will be overlayed on top of shaded faces.
Get/set the state of the "Textures" viewport option.
When set to True (default), texture maps will be displayed in the viewports if enabled at material or map level.
When set to False, texture maps will never be shown regardless of the Show Map In Viewport settings.
Get/set the state of the "Transparency" viewport option.
When set to True (default), transparency will be displayed in the viewports.
When set to False, transparency will be ignored and all objects will be displayed using solid shading.
Get/set the state of the "Use Environment Background Color" viewport option.
When set to False (default), the viewport background color will be taken from the corresponding value in the Customize User Interface > Color tab dialog.
When set to True, the viewport background color will be taken from the Environment Background color found in the "Environment and Effects" dialog > "Environment" tab > "Common Parameters" rollout > "Background" group of controls.
Get/set the state of the "Selection Brackets" option.
When set to True (default), selected objects will show selection brackets in shaded mode to denote their selected state.
When set to False, selected objects will not show selection brackets - you could enable the .SelectedEdgeFacesEnabled mode to visualize the selected state.
Get/set the state of the "Display Selected With Edged Faces" option.
When set to True, selected objects will be displayed with edged faces if the scene is set to shaded mode.
When set to False (default), all objects will be displayed in the current style.
Get/set the state of the "Shade Selected Faces" option.
When set to True (default), selected faces in sub-object level will be shaded in a solid color.
When set to False, selected faces will be highlighted using colored edges.
Get/set the state of the "Shade Selected Objects" option.
When set to True, selected objects will be displayed in shaded mode even if the scene is set to wireframe mode.
When set to False (default), all objects will be displayed in the current style.
Get/set the state of the "Disable" option.
When set to False (default), the viewport will be enabled and will redraw as needed.
When set to True, the viewport will be disabled and will only redraw when manually enforced.
Lighting and Shadows group of controls
<ViewportViewSettingImpl>.LightOption : enum : Read|Write LightOption enums: { #DefaultLight | #SceneLight }
Get/set the state of the "Lighting" > "Illuminate With..." radio buttons.
#DefaultLight - illuminates the scene with one or two default lights according to the .DefaultLightMode property.
#SceneLight - illuminates using the scene lights, unless there are no scene lights in which case the illumination will fall back to the default lighting.
<ViewportViewSettingImpl>.DefaultLightMode : enum : Read|Write DefaultLightMode enums: { #OneLight | #TwoLights }
Get/set the state of the "Default Lights" radio buttons.
#OneLight - illuminates the scene with one "headlight" placed behind the camera.
#TwoLights - illuminates the scene with two fixed lights.
<ViewportViewSettingImpl>.DefaultLightsFollowCamera : bool : Read|Write
NEW in 3ds Max 2013: Get/set the state of the "Default Lights Follow View Angle" checkbox.
Get/set the state of the "Highlights" option.
When set to True (default), specular highlights will be calculated in the viewports.
When set to False, no highlights will be calculated.
Get/set the state of the "Auto Display Selected Light" option.
<ViewportViewSettingImpl>.ShadowMode : enum : Read|Write ShadowMode enums: { #HardShadow | #SoftShadow | #LightSettingShadow }
Get/set the Shadows Style in 3ds Max 2012 - Hard Shadows, Soft Shadows or the Shadow type defined by the light source itself.
<ViewportViewSettingImpl>.LightingAndShadowQualityMode : enum : Read|Write LightingAndShadowQualityMode enums: { #HardShadows | #SoftEdgedShadows | #0.125X | #0.25X | #0.5X | #1X | #2X | #4X | #8X | #16X }
Get/set the Lighting and Shadows Quality.
Corresponds to the Lighting and "Shadows Quality" slider.
Numeric Value | Enum Name | UI Description |
---|---|---|
0 | #HardShadows | Point Lights/Hard Shadows |
1 | #SoftEdgedShadows | Point Lights/Soft Shadows |
2 | #0.125X | 0.125x - Very Low |
3 | #0.25X | 0.25x - Low |
4 | #0.5X | 0.5x - Medium |
5 | #1X | 1.0x - Default |
6 | #2X | 2.0x - High Quality |
7 | #4X | 4.0x - High Quality |
8 | #8X | 8.0x - High Quality |
9 | #16X | 16.0x - Very High Quality |
<ViewportViewSettingImpl>.UseSimplifiedSkyLight : bool : Read|Write
NEW in 3ds Max 2013: Get/set the state of the "Skylight as Ambient Color checkbox.
Get/set the state of the "Shadows" option.
When set to False (default), no shadows will be displayed in the viewports.
When set to True, lights with shadow casting enabled will also show shadows in the viewport using the quality settings described below:
Get/set the value of the "Shadows" > "Intensity/Fade" option.
Get/set the state of the "Ambient Occlusion" option.
When set to False (default), no ambient occlusion will be calculated.
When set to True, a screen-space ambient occlusion effect will be calculated using the settings described below:
Get/set the "Ambient Occlusion" > "Radius" value.
Get/set the "Ambient Occlusion" > "Intensity/Fade" value.
<ViewportViewSettingImpl>.ReflectionEnabled : bool : Read|Write
NEW in 3ds Max 2013: Get/set the state of the "Reflection From Environment" checkbox.
<ViewportViewSettingImpl>.DynamicReflectionEnabled : bool : Read|Write
Get/set the state of the dynamic reflections option (not exposed to the UI in 3ds Max 2012 and 3ds Max 2013).
When set to True, Materials with a Raytrace or Reflect/Refract map in their Reflection map slot will calculate dynamic reflections of the surrounding scene objects if switched to "Show Realistic Material In Viewport" mode.
When set to False (default), no dynamic reflections will be calculated.
Other Properties Not Exposed To The UI
<ViewportViewSettingImpl>.ProgressiveFadingFactor : integer : Read|Write
NEW in 3ds Max 2013: Get/set the Progressive Fading Factor value.
This value controls the speed of the progressive refining of the viewport.
A value of 0 means converge immediately, values between 4 and 16 mean very fast refinement, higher values slow down the process exponentially.
<ViewportViewSettingImpl>.UseViewportBackgroundEnabled : bool : Read|Write
NEW in 3ds Max 2013: No effect.
<ViewportViewSettingImpl>.UseSolidColor : bool : Read|Write
NEW in 3ds Max 2013: No effect.
Depth Of Field and Bokeh Effects
<ViewportViewSettingImpl>.DOFEnabled : bool : Read|Write
NEW in 3ds Max 2013: Get/set the state of the enable Depth Of Field option. Default is True.
The DOF viewport effect expects the view to be set to a Camera with a "depth of field (mental ray)" Multi-Pass effect to provide the f-stop value.
<ViewportViewSettingImpl>.BokehShape : filename : Read|Write
NEW in 3ds Max 2013: Get/set the bitmap filename of the Bokeh effect control image.
The Alpha channel of this bitmap controls the shape of the Bokeh effect, while the RGB control the color of the effect.
When set to an empty string "" (default), the DOF effect will produce a disk-shaped "circle of confusion".
Prints information about the NPR mode to the Listener including Parameter Name, Type, Value and Range. Returns OK.
Returns a string value containing information about the NPR mode including Parameter Name, Type, Value and Range. Similar to ShowNPRParameters() , but returns the info as a string value instead of printing to the Listener.
Returns the number of parameters in the current NPR mode.
Returns the name of the indexed parameter. The index is zero-based. If the index is out of range, the value of "No Parameter" is returned.
<enum><ViewportViewSettingImpl>.GetNPRParameterType <integer>index GetNPRParameterType enums: { #Unknown | #Bool | #Int | #Float | #Float4 | #String }
Returns the type of the indexed parameter. The index is zero-based. If the index is out of range, the value of #Unknown is returned.
Returns the value of the named boolean parameter of the current NPR mode.
Sets the value of the named boolean parameter of the current NPR mode to the boolean value passed as second argument.
Returns the value of the named integer parameter of the current NPR mode.
Returns the minimum value of the named integer parameter of the current NPR mode.
Returns the maximum value of the named integer parameter of the current NPR mode.
Sets the value of the named integer parameter of the current NPR mode to the integer value passed as second argument.
Returns the value of the named float parameter of the current NPR mode.
Returns the minimum value of the named float parameter of the current NPR mode.
Returns the maximum value of the named float parameter of the current NPR mode.
Sets the value of the named float parameter of the current NPR mode to the float value passed as second argument.
Returns the value of the named float4 parameter of the current NPR mode.
Returns the minimum value of the named float4 parameter of the current NPR mode.
Returns the maximum value of the named float4 parameter of the current NPR mode.
Sets the value of the named float4 parameter of the current NPR mode to the Point4 value passed as second argument.
The following scripted dialog exposes all parameters of the current Viewport Style Mode (if any) in a dynamic rollout for interactive tweaking. It also supports the NPR settings of the Quicksilver renderer and allows you to set the viewport and the renderer at the same time, thus giving an instant preview of the Quicksilver settings in the active viewport: