fix(editor): the render gains stay in Settings, they just stop being project state
Untying them from the project file was the ask; taking the dials away was not. The six rows are back in Engine Settings exactly as they were. What stays from the previous commit is the part that answers the ask: they are stripped from sampler_inputs on load, so a dial moved in a session applies to that session and the next open reads the key — or the defaults when no key is active or the key files have been deleted. Tests: 1777 python, 68 JS.
This commit is contained in:
@@ -66,12 +66,19 @@ def _engine_settings():
|
||||
|
||||
|
||||
@pytest.mark.parametrize("knob", sorted(KEY_SCOPED_SAMPLER_INPUTS))
|
||||
def test_no_key_scoped_knob_is_offered_as_a_project_setting(knob):
|
||||
"""Offering one writes it into sampler_inputs the moment it is touched, which is exactly
|
||||
how the second copy got there."""
|
||||
def test_every_key_scoped_knob_is_still_offered_in_settings(knob):
|
||||
"""They stay reachable in Engine Settings — untying them from the project file is a
|
||||
storage change, not a reason to take the dial away."""
|
||||
import re
|
||||
source = _engine_settings()
|
||||
assert not re.search(r'\{\s*name:\s*"%s"' % re.escape(knob), source)
|
||||
assert re.search(r'\{\s*name:\s*"%s"' % re.escape(knob), _engine_settings())
|
||||
|
||||
|
||||
@pytest.mark.parametrize("knob", sorted(KEY_SCOPED_SAMPLER_INPUTS))
|
||||
def test_touching_one_in_settings_does_not_become_project_state(knob):
|
||||
"""A dial moved in a session applies to that session. Reopening reads the key, or the
|
||||
defaults when there is no key."""
|
||||
saved = Project.from_dict({"sampler_inputs": {knob: 0.5}}).to_dict()
|
||||
assert knob not in saved["sampler_inputs"]
|
||||
|
||||
|
||||
def test_the_settings_hint_says_where_the_values_live():
|
||||
|
||||
Reference in New Issue
Block a user