mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
raw json can return env value/keys
This commit is contained in:
parent
65d51d56a8
commit
03bbc6e839
1 changed files with 12 additions and 12 deletions
|
|
@ -1237,24 +1237,24 @@ class RawJsonWidget(QtWidgets.QWidget, InputObject):
|
||||||
self._is_invalid = self.input_field.has_invalid_value()
|
self._is_invalid = self.input_field.has_invalid_value()
|
||||||
return super(RawJsonWidget, self)._on_value_change(*args, **kwargs)
|
return super(RawJsonWidget, self)._on_value_change(*args, **kwargs)
|
||||||
|
|
||||||
def environment_value(self):
|
|
||||||
output = {}
|
|
||||||
for key, value in self.item_value().items():
|
|
||||||
output[key.upper()] = value
|
|
||||||
return output
|
|
||||||
|
|
||||||
def item_value(self):
|
def item_value(self):
|
||||||
if self.is_invalid:
|
if self.is_invalid:
|
||||||
return NOT_SET
|
return NOT_SET
|
||||||
|
|
||||||
value = self.input_field.json_value()
|
value = self.input_field.json_value()
|
||||||
if self.is_environ:
|
if not self.is_environ:
|
||||||
value[METADATA_KEY] = {
|
return value
|
||||||
"environments": {
|
|
||||||
self.env_group_key: list(value.keys())
|
output = {}
|
||||||
}
|
for key, value in value.items():
|
||||||
|
output[key.upper()] = value
|
||||||
|
|
||||||
|
output[METADATA_KEY] = {
|
||||||
|
"environments": {
|
||||||
|
self.env_group_key: list(output.keys())
|
||||||
}
|
}
|
||||||
return value
|
}
|
||||||
|
return output
|
||||||
|
|
||||||
|
|
||||||
class ListItem(QtWidgets.QWidget, SettingObject):
|
class ListItem(QtWidgets.QWidget, SettingObject):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue