Get the Value of a Setting#

You can interact with app, extension, and user settings using the ISettings interface from the carb.settings module. This snippet shows how to get the value of an existing setting.

import carb.settings

settings = carb.settings.get_settings()

# get a string
print(settings.get("/log/file"))

# get an array (tuple)
print(settings.get("/app/exts/folders"))

# get an array element syntax:
print(settings.get("/app/exts/folders/0"))

# get a whole dictionary
exts = settings.get("/app/exts")
print(exts)
print(exts["folders"])

# get `None` if doesn't exist
print(settings.get("/app/DOES_NOT_EXIST_1111"))