Interfaces > Core Interfaces > ViewPanelManager |
This Core Interface exposes the View Panel Manager to MAXScript.
It provides methods for the creation and manipulation of View Panels containing custom viewport configurations, as well as methods for View Panel Presets management.
Available in 3ds Max 2013 and higher.
<index>ViewPanelManager.CreateViewPanel <string>tabName <enum>layout <bool>isActive layout enums: { #layout_1 | #layout_2v | #layout_2h | #layout_2ht | #layout_2hb | #layout_3vl | #layout_3vr | #layout_3ht | #layout_3hb | #layout_4 | #layout_4vl | #layout_4vr | #layout_4ht | #layout_4hb }
Creates a new View Panel with the name specified by the first argument.
The second argument specifies the layout name - see table below.
The third argument controls whether the new View Panel will set as the active one.
Returns the index of the new View Panel.
<integer>ViewPanelManager.GetViewPanelCount()
Returns the number of View Panels.
<bool>ViewPanelManager.SetActiveViewPanel <index>Index
Sets the active View Panel to the indexed definition.
Returns True on success, False on failure.
<index>ViewPanelManager.GetActiveViewPanelIndex()
Returns the index of the active View Panel.
<bool>ViewPanelManager.CanCreateMoreViewPanels()
Returns True if new View Panels can be created, False if the limit has been reached.
<string>ViewPanelManager.GetViewPanelName <index>Index
Returns the name of the indexed View Panel.
<bool>ViewPanelManager.SetViewPanelName <index>Index <string>newPanelName
Sets the name of the indexed View Panel to the string provided by the second argument.
<value>ViewPanelManager.GetActiveViewPanelDib()
Returns the Device Independent Bitmap (Viewport Snapshot) of the active View Panel.
The image will contain the content of all viewports in the View Panel.
<bool>ViewPanelManager.IsViewPanelLocked <index>Index
Returns True if the indexed View Panel is locked, False if it is not locked.
<bool>ViewPanelManager.SetSplitterBarPos <integer>splitterBarID <float>pos
Sets the position of the horizontal or vertical splitter bar to the specified position.
The first argument is in the range from 0 to 2 and depends on the current layout:
The second argument must be a float in the range from 0.0 to 1.0, with 0.5 being centered in the middle of the panel.
Returns True on success, False if the second argument is out of range. Note that attempting to set a non-visible splitter bar index still returns True.
<bool>ViewPanelManager.SetExtendedView <integer>viewIndex <enum>extendedViewType extendedViewType enums: {#ev_type_tree|#ev_type_schematic|#ev_type_sceneexplore}
Sets the indexed extended view to the extended view type specified by the second argument's enum value.
Not all extended view types are currently supported.
Enum | As Integer | Result |
---|---|---|
#ev_type_tree |
0 |
Set Extended Viewport to TrackView |
#ev_type_schematic |
1 |
Set Extended Viewport to Schematic View |
#ev_type_sceneexplore |
2 |
Set Extended Viewport to Scene Explorer |
<bool>ViewPanelManager.DestroyViewPanel <index>Index
Destroys the indexed View Panel.
Returns True on success, False on failure.
<integer>ViewPanelManager.GetPresetCount()
Returns the number of available named View Panel presets.
<string>ViewPanelManager.GetPresetName <index>presetIndex
Returns the name of the indexed View Panel Preset.
<index>ViewPanelManager.GetPresetID <string>presetName
Returns the ID of the named View Panel Preset.
<bool>ViewPanelManager.DoesViewPanelPresetExist <string>presetName
Returns True if a View Panel Preset with the name specified by the argument exists.
Returns False if the View Panel Preset with the specified name does not exist.
<integer>ViewPanelManager.GetViewPanelPresetLayout <integer>presetIndex
Returns the layout of the indexed View Panel Preset as an integer.
<index>ViewPanelManager.CreateViewPanelFromPreset <string>presetName <bool>isActive
Creates a new View Panel from the specified named preset.
If the second argument is set to True, the View Panel will also be made active.
Returns the index of the new View Panel.
<bool>ViewPanelManager.CreatePresetFromActiveViewPanel <string>presetName
Creates a new Preset with the specified name from the active View Panel.
If the name already exists, it will be appended a numeric suffix, e.g. "Test" will become "Test 01".
Returns True on success, False on failure.
<bool>ViewPanelManager.CreatePresetFromViewPanel <index>panelIndex <string>presetName
Creates a new Preset from the indexed View Panel specified by the first argument.
The Preset will be named according to the second argument.
Returns True on success, False on failure.
<bool>ViewPanelManager.RenameViewPanelPreset <string>presetName <string>newName
Renames the View Panel Preset specified by the first argument to the name given by the second argument.
Returns True if the renaming succeeded.
Returns False if a Preset with the name specified by the first argument does not exist.
<bool>ViewPanelManager.DeletePreset <string>presetName
Deletes the named View Panel Preset.
Returns False if the named Preset does not exist.
<bool>ViewPanelManager.DeleteAllViewPanelPresets()
Deletes all View Panel Presets.
Returns True on success, False on failure.