Settings

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

Fields

AnimationFolder

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

Animations

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

AutomaticDocumentationContent

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

AutoSaveReasons

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

BalancedThreads

#
public static readonly Settings.Setting<int> 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.

CacheAutoSaveData

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

CanvasAutoSearch

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

CanvasDrawFullNames

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

CanvasDrawLabels

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

CanvasFrameDiagnostics

#
public static readonly Settings.Setting<bool> 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.

CanvasHints

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

CanvasLabelAbove

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

CanvasLabelName

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

CanvasLabelPlugin

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

CanvasLabelProfiler

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

CanvasLabelSlowOnly

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

CanvasMessages

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

CanvasShowIcons

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

CanvasSkin

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

CanvasSnapToObjects

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

DarkMode

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

DelayPeriod

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

DisplayNewShader

#
public static readonly Settings.Setting<bool> 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.

DuplicateInputs

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

FfmpegPath

#
public static readonly Settings.Setting<string> 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.

GlobalClipboard

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

IntenseThreads

#
public static readonly Settings.Setting<int> 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.

LooseWindow

#
public static readonly Settings.Setting<bool> 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.

MeritWarning

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

MultiFileUi

#
public static readonly Settings.Setting<int> 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.

MultiThreading

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

PrimaryUiLang

#
public static readonly Settings.Setting<int> 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.

ReducedThreads

#
public static readonly Settings.Setting<int> 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.

ReinstateSession

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

SandBoxChanged

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

SeededSkins

#
public static readonly Settings.Setting<string> 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.

ShowObscure

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

TabIconShadows

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

TabPreview

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

TooltipEnabled

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

TranslateMenus

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

TranslateMessages

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

TranslateObjects

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

TranslateTooltips

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

TypefaceMono

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

TypefaceSans

#
public static readonly Settings.Setting<string> 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.

TypefaceScript

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

TypefaceSerif

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

UserDays

#
public static readonly Settings.Setting<int> 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.

UserName

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

ZoomThresholdDetailed

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

ZoomThresholdStandard

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

Properties

BalancedCores

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

LogicalCores

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

PrimaryUiLanguage

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

SandBox

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

ThreadCount

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

Methods

IsAutoSaveReason

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

RevertToDefault

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

SetUserName

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