Settings

public static class Settings
Provides static properties and events for central Grasshopper settings.

Fields

AnimationFolder

#
Gets the folder new animations put their output folders underneath. An empty value means the pictures folder is used.
public static readonly Settings.Setting<string> AnimationFolder

Animations

#
Gets whether UI uses animations.
public static readonly Settings.Setting<bool> Animations

AutomaticDocumentationContent

#
Gets whether the documentation includes automatically generated content.
public static readonly Settings.Setting<bool> AutomaticDocumentationContent

AutoSaveReasons

#
Gets the list of reasons which will trigger an autosave.
public static readonly Settings.Setting<int> AutoSaveReasons

BalancedThreads

#
Gets the number of threads to use during balanced multithreading calculations. A value of zero means a default value will be picked based on the number of available processors.
public static readonly Settings.Setting<int> BalancedThreads

CacheAutoSaveData

#
Gets whether autosaves reuse the serialised form of persistent data that has not changed since the previous autosave.
public static readonly Settings.Setting<bool> CacheAutoSaveData

CanvasAutoSearch

#
Gets whether text input is handled internally, or piped into the Rhino command line.
public static readonly Settings.Setting<bool> CanvasAutoSearch

CanvasDrawFullNames

#
Gets whether the canvas draws fully blown input and output names for component parameters.
public static readonly Settings.Setting<bool> CanvasDrawFullNames

CanvasDrawLabels

#
Gets whether the canvas draws object info labels.
public static readonly Settings.Setting<bool> CanvasDrawLabels

CanvasFrameDiagnostics

#
Gets whether the canvas draws a small repaint diagnostics overlay showing frame counts and frame durations. This is a troubleshooting tool for runaway redraw loops; a frame counter which keeps climbing while nobody is interacting with the canvas indicates such a loop.
public static readonly Settings.Setting<bool> CanvasFrameDiagnostics

CanvasHints

#
Gets whether the canvas draws object hints and tips.
public static readonly Settings.Setting<bool> CanvasHints

CanvasLabelAbove

#
Gets whether the info label is drawn above or below the object.
public static readonly Settings.Setting<bool> CanvasLabelAbove

CanvasLabelName

#
Gets whether the info label contains the object name.
public static readonly Settings.Setting<bool> CanvasLabelName

CanvasLabelPlugin

#
Gets whether the info label contains the object plugin name.
public static readonly Settings.Setting<bool> CanvasLabelPlugin

CanvasLabelProfiler

#
Gets whether the info label contains the object performance.
public static readonly Settings.Setting<bool> CanvasLabelProfiler

CanvasLabelSlowOnly

#
Gets whether the info label limits itself to slow objects if CanvasLabelProfiler is true.
public static readonly Settings.Setting<bool> CanvasLabelSlowOnly

CanvasMessages

#
Gets whether the canvas draws object message icons.
public static readonly Settings.Setting<bool> CanvasMessages

CanvasShowIcons

#
Gets whether components show their name or their icon by default.
public static readonly Settings.Setting<bool> CanvasShowIcons

CanvasSkin

#
The name of the skin the canvas uses, which is a file in the skins folder. Empty means the built-in skin.
public static readonly Settings.Setting<string> CanvasSkin

CanvasSnapToObjects

#
Gets whether objects are snapped to other objects during dragging and resizing.
public static readonly Settings.Setting<bool> CanvasSnapToObjects

DarkMode

#
Gets whether UI is drawn using Dark Mode themes.
public static readonly Settings.Setting<bool> DarkMode

DelayPeriod

#
Gets or sets the grace period (in milliseconds) for delayed solutions.
public static readonly Settings.Setting<int> DelayPeriod

DisplayNewShader

#
Gets whether meshes are drawn with the new shader. This setting will eventually go away when the new shader becomes the only one available, or when we decide to discontinue it.
public static readonly Settings.Setting<bool> DisplayNewShader

DuplicateInputs

#
Gets or sets whether to duplicate data in component inputs during solutions. This is a validation/debugging feature.
public static readonly Settings.Setting<bool> DuplicateInputs

FfmpegPath

#
Gets the absolute path of the FFmpeg executable used to encode animations. An empty value means it has not been found yet, or is not installed.

The path is absolute and never a bare name. A windowed application does not inherit the PATH a terminal has, so on macOS in particular 'ffmpeg' resolves for the user and not for Rhino.

public static readonly Settings.Setting<string> FfmpegPath

GlobalClipboard

#
Gets whether copied document objects end up in the OS clipboard, or in the static Grasshopper clipboard.
public static readonly Settings.Setting<bool> GlobalClipboard

IntenseThreads

#
Gets the number of threads to use during intense multithreading calculations. A value of zero means a default value will be picked based on the number of available processors.
public static readonly Settings.Setting<int> IntenseThreads

LooseWindow

#
Gets whether top-level Grasshopper windows remain loose, i.e. are never assigned the Rhino window as their parent. A loose window does not stay on top of Rhino, but it participates fully in operating system window management, in particular docking against screen edges on macOS, which is denied to child windows.
public static readonly Settings.Setting<bool> LooseWindow

MeritWarning

#
Gets or sets the merit level at which conversion warnings appear.
public static readonly Settings.Setting<int> MeritWarning

MultiFileUi

#
Gets or sets where to show the loaded file UI.

0 = File menu only.

1 = File menu and status bar.

2 = File menu and canvas tabs.

public static readonly Settings.Setting<int> MultiFileUi

MultiThreading

#
Gets the multithreading level to use during solution processes. This will be either 1=reduced, 2=balanced, 3=intense.
public static readonly Settings.Setting<int> MultiThreading

PrimaryUiLang

#
Gets the primary UI language. At present there is no secondary language any more. This integer ought to be one of the Localisation.SupportedLanguage enumerations.
public static readonly Settings.Setting<int> PrimaryUiLang

ReducedThreads

#
Gets the number of threads to use during reduced multithreading calculations. A value of zero means a default value will be picked based on the number of available processors.
public static readonly Settings.Setting<int> ReducedThreads

ReinstateSession

#
Gets whether the documents from the previous session should be reinstated on Grasshopper load.
public static readonly Settings.Setting<bool> ReinstateSession

SandBoxChanged

#
Static even for changes to the SandBoxMode property.
public static EventHandler SandBoxChanged

SeededSkins

#
The names of the shipped skins that have been copied into the skins folder, one per line. A skin is copied once, so deleting or renaming the copy sticks.
public static readonly Settings.Setting<string> SeededSkins

ShowObscure

#
Gets whether obscure components are shown on the main tab panels.
public static readonly Settings.Setting<bool> ShowObscure

TabIconShadows

#
Gets whether ribbon icons are drawn with drop shadows.
public static readonly Settings.Setting<bool> TabIconShadows

TabPreview

#
Gets whether the contents of ribbon tabs are previewed on mouse hover.
public static readonly Settings.Setting<bool> TabPreview

TooltipEnabled

#
Gets whether the tooltips are drawn at all.
public static readonly Settings.Setting<bool> TooltipEnabled

TranslateMenus

#
Gets whether menu items ought to be translated into the primary UI language.
public static readonly Settings.Setting<bool> TranslateMenus

TranslateMessages

#
Gets whether error and informational messages ought to be translated into the primary UI language.
public static readonly Settings.Setting<bool> TranslateMessages

TranslateObjects

#
Gets whether object names ought to be translated into the primary UI language.
public static readonly Settings.Setting<bool> TranslateObjects

TranslateTooltips

#
Gets whether tooltip messages ought to be translated into the primary UI language.
public static readonly Settings.Setting<bool> TranslateTooltips

TypefaceMono

#
Family names for the monospaced typeface, most preferred first and comma separated. Empty means the Victor Mono bundled with Grasshopper.
public static readonly Settings.Setting<string> TypefaceMono

TypefaceSans

#
Family names for the sans-serif typeface, most preferred first and comma separated. Empty means the font the OS draws its own interface with.
public static readonly Settings.Setting<string> TypefaceSans

TypefaceScript

#
Family names for the script typeface, most preferred first and comma separated. Empty means the Playpen Sans bundled with Grasshopper.
public static readonly Settings.Setting<string> TypefaceScript

TypefaceSerif

#
Family names for the serif typeface, most preferred first and comma separated. Empty means the platform serif.
public static readonly Settings.Setting<string> TypefaceSerif

UserDays

#
Gets the number of days that the user has used Grasshopper. The UI may choose to emphasize or de-emphasize elements based on the user's exposure to the software.
public static readonly Settings.Setting<int> UserDays

UserName

#
Gets the user name, which will be used to store individualised modifications.
public static readonly Settings.Setting<string> UserName

ZoomThresholdDetailed

#
Gets the zoom threshold above which detailed UI will become visible.
public static readonly Settings.Setting<float> ZoomThresholdDetailed

ZoomThresholdStandard

#
Gets the zoom threshold below which normal UI will become invisible.
public static readonly Settings.Setting<float> ZoomThresholdStandard

Properties

BalancedCores

#
Gets the number of cores which would result in 'balanced' multithreading.
public static int BalancedCores { get; }

LogicalCores

#
Gets the number of logical cores on this system.
public static int LogicalCores { get; }

PrimaryUiLanguage

#
Gets the primary ui language, cast from the settings integer to an appropriate enum.
public static Language PrimaryUiLanguage { get; }

SandBox

#
Gets or sets whether Grasshopper is in sandbox mode. While in sandbox mode, no setting changes should become persistent.
public static bool SandBox { get; set; }

ThreadCount

#
Gets the number of threads to use during computations. This property returns the resolved value based on the various threading settings.
public static int ThreadCount { get; }

Methods

IsAutoSaveReason

#
Test whether a specific reason is part of the accepted set.
public static bool IsAutoSaveReason()

RevertToDefault

#
Revert all values to factory default settings.
public static void RevertToDefault()

SetUserName

#
Let the user pick a new user name for themselves.
public static bool SetUserName()