Interfaces > Core Interfaces > NitrousGraphicsManager |
This Core Interface exposes the Nitrous Graphics Manager to MAXScript.
NitrousGraphicsManager.MakePreviewQuality : integer : Read|Write
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
Get/set whether the compiling of shaders will use multiple threads (True) or a single thread (False).
NitrousGraphicsManager.ChangeCursorOnMouseMove : bool : Read|Write
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.
NitrousGraphicsManager.BackfaceCullWireframeEnabled : bool : Read|Write
NitrousGraphicsManager.ShadowmapSizeLimit : integer : Read|Write
Get/set the Shadow Map Size Limit. Default is 512.
NitrousGraphicsManager.NormalBumpMode : integer : Read|Write
Get/set the Normal Bump Mode controlled via radio buttons in the Customize menu > Preferences dialog > General tab.
NitrousGraphicsManager.BackgroundProgressiveRenderingEnabled : bool : Read|Write
Get/set whether the Nitrous will perform progressive refinements when 3ds Max is not in focus.
When set to False (default), Nitrous will not perform progressive refinements when 3ds Max is running in the background.
When set to True, progressive refinement will be performed even when 3ds Max is running in the background.
Note that this can cause performance issues. Use At Your Own Risk!
NitrousGraphicsManager.OverrideShadingMtl : material : Read|Write
Gets or sets the material used when the viewport display is set to User Defined > Materials > Override with UV Checker.
NitrousGraphicsManager.OverrideRenderSettingMtl : material : Read|Write
Gets or sets the material used when the viewport display is set to User Defined > Materials > Override with Rendering Setting.
NitrousGraphicsManager.HardwareHitTestEnabled : bool : Read|Write
Get/set the state of the Hardware Hit Testing in the viewport.
NitrousGraphicsManager.GesturaEnabled : bool : Read|Write
NitrousGraphicsManager.AntialiasingQuality : enum : Read|Write AntialiasingQuality enums: {#None|#2X|#4X|#8X}
Get/set the Nitrous viewport Anti-Aliasing quality.
NitrousGraphicsManager.DarkerEdgeOption : enum : Read|Write DarkerEdgeOption enums: {#Off|#SubLevelOnly|#Always}
Gets or sets the option in wireframe mode to draw back facing mesh edges darker than front facing edges. This option has no corresponding UI control.
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.
The parameter used to be 0-based in previous versions, it is 1-based in 3ds Max 2014 and higher.
See further of this page for details.
<IObject>NitrousGraphicsManager.GetSelectionSetting()
Returns a <IObject:SelectionEffectImpl> object which exposes the general viewport selection settings..
See further of this page for details.
<IObject>NitrousGraphicsManager.GetWorldSetting()
Returns a <IObject:WorldSettingImpl> object which exposes the world optimization settings.
See further of this page for details.
Returns True if the Nitrous Graphics system is enabled, False otherwise.
<bool>NitrousGraphicsManager.ProgressiveRendering()
Triggers progressive rendering.
Returns True on success, False of failure.
<bool>NitrousGraphicsManager.IsProgressiveRenderingFinished()
Returns True of the progressive refinement for the current frame has finished, False otherwise.
<bool>NitrousGraphicsManager.API()
Returns the driver type used by the viewport, where:
<bool>NitrousGraphicsManager.IsProgressiveRenderingFinished()
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.
Returns True on success, False on failure.
<void>NitrousGraphicsManager.SetProceduralTextureSizeLimit <integer>sizeLimit
Sets the maximum procedural texture size to the specified limit value.
Procedural textures have to be rendered as 2D bitmaps before they can be displayed in the viewport. This method lets you limit the size of these bitmaps to avoid running out of graphics card memory when working in scenes with many procedural textures.
<void>NitrousGraphicsManager.ForceDisableMipMapGeneration <bool>bDisable
When the argument is passed as True, this method will disable the MipMap generation of viewport textures. When passed as False, the MipMapping will be enabled.
MipMapping creates multiple resolutions of the same texture and looks up texels in the one whose resolution most closely matches the pixel distance in the viewport to avoid artefacts.
But the multiple resolutions of the MipMap require 33% more memory than a single high-resolution version of the same texture.
Thus, turning MipMap Generation off can save significant amounts of graphics card memory at cost of texture display quality.
<bool>NitrousGraphicsManager.SetAppWindowSize <integer>width <integer>height
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
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.
Returns True on success, False of failure.
<bool>NitrousGraphicsManager.PinViewPanelSize <integer>width <integer>height <bool>NitrousGraphicsManager.UnpinViewPanelSize()
These methods are for internal use only.
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()
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()
Runs the Nitrous system message loop. For internal use only.
Returns True on success, False of failure.
<void>NitrousGraphicsManager.BeginPartialUpdateCompareTest()
Starts the partial update compare test. For internal use only.
<void>NitrousGraphicsManager.EndPartialUpdateCompareTest()
Ends the partial update compare test. For internal use only.
<bool>NitrousGraphicsManager.GetPartialUpdateCompareTestResult()
Returns True if the partial update compare test succeeded, False if it did not pass. For internal use only.
<bool>NitrousGraphicsManager.ApplyViewportViewSettingToLegacyView <integer>index
<bool>NitrousGraphicsManager.ShowShaderDebugger() <bool>NitrousGraphicsManager.HideShaderDebugger()
Opens and closes the Nitrous Shader Debugger window.
<bool>NitrousGraphicsManager.SaveViewGraph <index>viewIndex <string>viewGraphName
Saves the View Graph of the indexed view to the specified name.
<bool>NitrousGraphicsManager.LoadViewGraph <index>viewIndex <string>viewGraphName
Loads the View Graph with the name specified by the second argument in the indexed viewport specified by the first argument.
<bool>NitrousGraphicsManagerUnloadViewGraph <index>viewIndex
Unloads the View Graph from the indexed viewport.
<bool>NitrousGraphicsManager.SetViewShadeFragment <index>viewIndex <DWORD>classIDPartA <DWORD>classIDPartB <bool>NitrousGraphicsManager.ResetViewShadeFragment <index>viewIndex
These methods are for internal use only.
<IObject>NitrousGraphicsManager.GetFixedViewportPipeline <index>index
Returns the FixedViewportPipeline IObject (see below) of the indexed viewport.
Interface: FixedViewportPipeline
Exposes methods for adding shading fragments to the Fixed Viewport Pipeline.
<bool>SetShadingFragment <DWORD>classIDA <DWORD>classIDB
Sets a shading fragment with the specified classIDs.
Returns True on success, False on failure.
<void>RestoreDefaultShadingFragment()
Restores the default shading fragment.
<bool>SetBackgroundFragment <DWORD>classIDA <DWORD>classIDB
Sets a background fragment with the specified classIDs.
Returns True on success, False on failure.
<void>RestoreDefaultBackgroundFragment()
Restores the default background fragment.
<string>InsertOverlayFragment <index>index <DWORD>classIDA <DWORD>classIDB
Inserts an overlay fragment with the specified class IDs at the indexed position.
Returns the name of the overlay fragment.
<bool>DeleteOverlayFragmentByIndex <index>index
Deletes the indexed overlay fragment.
Returns True on success, False on failure.
<bool>DeleteOverlayFragmentByName <string>name
Deletes the named overlay fragment.
Returns True on success, False on failure.
<integer>GetNumOverlayFragments()
Returns the number of overlay fragments.
<string>GetOverlayFragmentName <index>index
Returns the name of the indexed overlay fragment.
<string>InsertPostShadingFragment <index>index <DWORD>classIDA <DWORD>classIDB
Inserts a post-shading fragment with the specified class IDs at the indexed position.
Returns the name of the post-shading fragment.
<bool>DeletePostShadingFragmentByIndex <index>index
Deletes the indexed post-shading fragment.
Returns True on success, False on failure.
<bool>DeletePostShadingFragmentByName <string>name
Deletes the named post-shading fragment.
Returns True on success, False on failure.
<integer>GetNumPostShadingFragments()
Returns the number of post-shading fragments.
<string>GetPostShadingFragmentName <index>index
Interface: WorldSettingImpl
This interface is exposed by the IObject returned by the method NitrousGraphicsManager.GetWorldSetting()
<WorldSettingImpl>.ConsolidationEnabled : bool : Read|Write
Get/set the state of the Consolidation option.
<WorldSettingImpl>.InstanceEnabled : bool : Read|Write
Get/set the state of the Instancing option.
<WorldSettingImpl>.StaticEnabled : bool : Read|Write
<WorldSettingImpl>.MaxConsolidatableNodePrimitive : integer : Read|Write
Get/set the maximum number of consolidatable node primitives.
<WorldSettingImpl>.MaxConsolidationCellPrimitive : integer : Read|Write
Get/set the maximum number of consolidation cell primitives.
<WorldSettingImpl>.MinConsolidationCellPrimitive : integer : Read|Write
Get/set the minimum number of consolidation cell primitives.
<WorldSettingImpl>.MaxInstancableNodePrimitive : integer : Read|Write
Interface: SelectionEffectImpl
The interface is exposed by the IObject returned by the method NitrousGraphicsManager.GetSelectionSetting().
It exposes the viewport selection settings seen in the Selection/Preview Highlights section of the Viewports tab of the Customize > Preferences dialog.
Properties:
<SelectionEffectImpl>.Enabled : bool : Read|Write
Gets or sets whether the Selection/Preview Highlights settings are used.
<SelectionEffectImpl>.SelectionHighlightEnabled : bool : Read|Write
Gets or sets the Selection Overlay setting. When on, selected items are displayed with a color overlay.
<SelectionEffectImpl>.SelectionOutlineEnabled : bool : Read|Write
Gets or sets the Selection Outline setting. When on, selected items are displayed with a color outline.
<SelectionEffectImpl>.PreviewHighlightEnabled : bool : Read|Write
Gets or sets the Preview Overlay setting. When on, items that could be selected with a mouse click are displayed with a color overlay when the mouse is over them in the viewport.
<SelectionEffectImpl>.PreviewOutlineEnabled : bool : Read|Write
Gets or sets the Preview Outline setting. When on, items that could be selected with a mouse click are displayed with a color outline when the mouse is over them in the viewport.
<SelectionEffectImpl>.AnimationEnabled : bool : Read|Write
Gets or sets the animation effect applied to the highlight of a selection preview. The default is false. There is no UI for this parameter.
<SelectionEffectImpl>.HighlightFactor : float : Read|Write
Gets or sets the blending factor used to set the transparency of the selection highlight overlay. The default is 0.15. There is no UI for this parameter.
<SelectionEffectImpl>.UseSceneDepth : bool : Read|Write
Gets or sets whether the selection preview uses the scene depth buffer to apply the selection preview. If false, the preview selection will highlight objects even if they are behind other objects. There is no UI for this parameter.
Methods:
None.
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.
<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.
<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
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>.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
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
Get/set the state of the "Reflection From Environment" checkbox.
<ViewportViewSettingImpl>.DynamicReflectionEnabled : bool : Read|Write
Get/set the state of the dynamic reflections option (currently not exposed to the UI).
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.
<ViewportViewSettingImpl>.ProgressiveFadingFactor : integer : Read|Write
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
<ViewportViewSettingImpl>.UseSolidColor : bool : Read|Write
<ViewportViewSettingImpl>.DOFEnabled : bool : Read|Write
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
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: