Browse Source

Cleanup

tags/1.9.8
falkTX 7 years ago
parent
commit
1d932de9b7
4 changed files with 49 additions and 31 deletions
  1. +5
    -3
      source/carla_backend.py
  2. +19
    -11
      source/carla_host.py
  3. +19
    -13
      source/carla_settings.py
  4. +6
    -4
      source/carla_shared.py

+ 5
- 3
source/carla_backend.py View File

@@ -1230,17 +1230,19 @@ class CarlaHostMeta(object):
self.processModeForced = False
self.audioDriverForced = None


# settings
self.experimental = False
self.manageUIs = False
self.maxParameters = 0
self.forceStereo = False
self.preferPluginBridges = False
self.preferUIBridges = False
self.preventBadBehaviour = False
self.manageUIs = False
self.showPluginBridges = False
self.showLogs = False
self.uisAlwaysOnTop = False
self.maxParameters = 0
self.uiBridgesTimeout = 0
self.uisAlwaysOnTop = False

# settings
self.pathBinaries = ""


+ 19
- 11
source/carla_host.py View File

@@ -2493,7 +2493,6 @@ def loadHostSettings(host):

settings = QSettings("falkTX", "Carla2")

# bool values
try:
host.experimental = settings.value(CARLA_KEY_MAIN_EXPERIMENTAL, CARLA_DEFAULT_MAIN_EXPERIMENTAL, type=bool)
except:
@@ -2505,14 +2504,9 @@ def loadHostSettings(host):
host.manageUIs = CARLA_DEFAULT_MANAGE_UIS

try:
host.showLogs = settings.value(CARLA_KEY_MAIN_SHOW_LOGS, CARLA_DEFAULT_MAIN_SHOW_LOGS, type=bool)
except:
host.showLogs = CARLA_DEFAULT_MAIN_SHOW_LOGS

try:
host.uisAlwaysOnTop = settings.value(CARLA_KEY_ENGINE_UIS_ALWAYS_ON_TOP, CARLA_DEFAULT_UIS_ALWAYS_ON_TOP, type=bool)
host.maxParameters = settings.value(CARLA_KEY_ENGINE_MAX_PARAMETERS, CARLA_DEFAULT_MAX_PARAMETERS, type=int)
except:
host.uisAlwaysOnTop = CARLA_DEFAULT_UIS_ALWAYS_ON_TOP
host.maxParameters = CARLA_DEFAULT_MAX_PARAMETERS

try:
host.forceStereo = settings.value(CARLA_KEY_ENGINE_FORCE_STEREO, CARLA_DEFAULT_FORCE_STEREO, type=bool)
@@ -2529,17 +2523,31 @@ def loadHostSettings(host):
except:
host.preferUIBridges = CARLA_DEFAULT_PREFER_UI_BRIDGES

# int values
try:
host.maxParameters = settings.value(CARLA_KEY_ENGINE_MAX_PARAMETERS, CARLA_DEFAULT_MAX_PARAMETERS, type=int)
host.preventBadBehaviour = settings.value(CARLA_KEY_EXPERIMENTAL_PREVENT_BAD_BEHAVIOUR, CARLA_DEFAULT_EXPERIMENTAL_PREVENT_BAD_BEHAVIOUR, type=bool)
except:
host.maxParameters = CARLA_DEFAULT_MAX_PARAMETERS
host.preventBadBehaviour = CARLA_DEFAULT_EXPERIMENTAL_PREVENT_BAD_BEHAVIOUR

try:
host.showPluginBridges = settings.value(CARLA_KEY_EXPERIMENTAL_PLUGIN_BRIDGES, CARLA_DEFAULT_EXPERIMENTAL_PLUGIN_BRIDGES, type=bool)
except:
host.showPluginBridges = CARLA_DEFAULT_EXPERIMENTAL_PLUGIN_BRIDGES

try:
host.showLogs = settings.value(CARLA_KEY_MAIN_SHOW_LOGS, CARLA_DEFAULT_MAIN_SHOW_LOGS, type=bool)
except:
host.showLogs = CARLA_DEFAULT_MAIN_SHOW_LOGS

try:
host.uiBridgesTimeout = settings.value(CARLA_KEY_ENGINE_UI_BRIDGES_TIMEOUT, CARLA_DEFAULT_UI_BRIDGES_TIMEOUT, type=int)
except:
host.uiBridgesTimeout = CARLA_DEFAULT_UI_BRIDGES_TIMEOUT

try:
host.uisAlwaysOnTop = settings.value(CARLA_KEY_ENGINE_UIS_ALWAYS_ON_TOP, CARLA_DEFAULT_UIS_ALWAYS_ON_TOP, type=bool)
except:
host.uisAlwaysOnTop = CARLA_DEFAULT_UIS_ALWAYS_ON_TOP

if host.isPlugin:
return



+ 19
- 13
source/carla_settings.py View File

@@ -485,6 +485,11 @@ class CarlaSettingsW(QDialog):
def slot_saveSettings(self):
settings = QSettings()

self.host.experimental = self.ui.ch_main_experimental.isChecked()

if not self.host.experimental:
self.resetExperimentalSettings()

# ----------------------------------------------------------------------------------------------------
# Main

@@ -521,8 +526,6 @@ class CarlaSettingsW(QDialog):
# ----------------------------------------------------------------------------------------------------
# Main

self.host.experimental = self.ui.ch_main_experimental.isChecked()

settings.setValue(CARLA_KEY_MAIN_EXPERIMENTAL, self.host.experimental)

# ----------------------------------------------------------------------------------------------------
@@ -753,19 +756,22 @@ class CarlaSettingsW(QDialog):
self.ui.lw_sfz.addItem(path)

# ----------------------------------------------------------------------------------------------------
# Paths
# Experimental

elif self.ui.lw_page.currentRow() == self.TAB_INDEX_EXPERIMENTAL:
# Forever experimental
self.ui.cb_advanced_plugin_bridges.setChecked(CARLA_DEFAULT_EXPERIMENTAL_PLUGIN_BRIDGES)
self.ui.ch_advanced_load_lib_global.setChecked(CARLA_DEFAULT_EXPERIMENTAL_LOAD_LIB_GLOBAL)

# Temporary, until stable
self.ui.cb_canvas_fancy_eyecandy.setChecked(CARLA_DEFAULT_CANVAS_FANCY_EYE_CANDY)
self.ui.cb_canvas_use_opengl.setChecked(CARLA_DEFAULT_CANVAS_USE_OPENGL and self.ui.cb_canvas_use_opengl.isEnabled())
self.ui.cb_canvas_render_hq_aa.setChecked(CARLA_DEFAULT_CANVAS_HQ_ANTIALIASING and self.ui.cb_canvas_render_hq_aa.isEnabled())
self.ui.ch_engine_force_stereo.setChecked(CARLA_DEFAULT_FORCE_STEREO)
self.ui.ch_engine_prefer_plugin_bridges.setChecked(CARLA_DEFAULT_PREFER_PLUGIN_BRIDGES)
self.resetExperimentalSettings()

def resetExperimentalSettings(self):
# Forever experimental
self.ui.cb_advanced_plugin_bridges.setChecked(CARLA_DEFAULT_EXPERIMENTAL_PLUGIN_BRIDGES)
self.ui.ch_advanced_load_lib_global.setChecked(CARLA_DEFAULT_EXPERIMENTAL_LOAD_LIB_GLOBAL)

# Temporary, until stable
self.ui.cb_canvas_fancy_eyecandy.setChecked(CARLA_DEFAULT_CANVAS_FANCY_EYE_CANDY)
self.ui.cb_canvas_use_opengl.setChecked(CARLA_DEFAULT_CANVAS_USE_OPENGL and self.ui.cb_canvas_use_opengl.isEnabled())
self.ui.cb_canvas_render_hq_aa.setChecked(CARLA_DEFAULT_CANVAS_HQ_ANTIALIASING and self.ui.cb_canvas_render_hq_aa.isEnabled())
self.ui.ch_engine_force_stereo.setChecked(CARLA_DEFAULT_FORCE_STEREO)
self.ui.ch_engine_prefer_plugin_bridges.setChecked(CARLA_DEFAULT_PREFER_PLUGIN_BRIDGES)

# --------------------------------------------------------------------------------------------------------



+ 6
- 4
source/carla_shared.py View File

@@ -227,8 +227,9 @@ CARLA_KEY_PATHS_GIG = "Paths/GIG"
CARLA_KEY_PATHS_SF2 = "Paths/SF2"
CARLA_KEY_PATHS_SFZ = "Paths/SFZ"

CARLA_KEY_EXPERIMENTAL_PLUGIN_BRIDGES = "Main/PluginBridges" # bool
CARLA_KEY_EXPERIMENTAL_LOAD_LIB_GLOBAL = "Main/LoadLibGlobal" # bool
CARLA_KEY_EXPERIMENTAL_PLUGIN_BRIDGES = "Experimental/PluginBridges" # bool
CARLA_KEY_EXPERIMENTAL_PREVENT_BAD_BEHAVIOUR = "Experimental/PreventBadBehaviour" # bool
CARLA_KEY_EXPERIMENTAL_LOAD_LIB_GLOBAL = "Experimental/LoadLibGlobal" # bool

# if pro theme is on and color is black
CARLA_KEY_CUSTOM_PAINTING = "UseCustomPainting" # bool
@@ -286,8 +287,9 @@ else:
CARLA_DEFAULT_PROCESS_MODE = ENGINE_PROCESS_MODE_PATCHBAY
CARLA_DEFAULT_TRANSPORT_MODE = ENGINE_TRANSPORT_MODE_INTERNAL

CARLA_DEFAULT_EXPERIMENTAL_PLUGIN_BRIDGES = False
CARLA_DEFAULT_EXPERIMENTAL_LOAD_LIB_GLOBAL = False
CARLA_DEFAULT_EXPERIMENTAL_PLUGIN_BRIDGES = False
CARLA_DEFAULT_EXPERIMENTAL_PREVENT_BAD_BEHAVIOUR = False
CARLA_DEFAULT_EXPERIMENTAL_LOAD_LIB_GLOBAL = False

# ------------------------------------------------------------------------------------------------------------
# Default Plugin Folders (get)


Loading…
Cancel
Save