mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 11:44:09 +02:00
Fix swatch colors
This commit is contained in:
parent
71993972a2
commit
441ba15708
1 changed files with 21 additions and 35 deletions
|
@ -295,14 +295,12 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
type: "swatch",
|
type: "swatch",
|
||||||
properties: {
|
properties: {
|
||||||
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
||||||
localPosition: { x: -0.035, y: -0.03, z: -0.005 },
|
localPosition: { x: -0.035, y: -0.03, z: -0.005 }
|
||||||
color: { red: 0, green: 255, blue: 255 },
|
|
||||||
solid: true
|
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
key: "VREdit.colorTool.swatch1Color",
|
key: "VREdit.colorTool.swatch1Color",
|
||||||
property: "color"
|
property: "color",
|
||||||
// Default value is set in properties, above.
|
defaultValue: { red: 0, green: 255, blue: 255 }
|
||||||
},
|
},
|
||||||
command: {
|
command: {
|
||||||
method: "setColorPerSwatch",
|
method: "setColorPerSwatch",
|
||||||
|
@ -318,14 +316,12 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
type: "swatch",
|
type: "swatch",
|
||||||
properties: {
|
properties: {
|
||||||
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
||||||
localPosition: { x: -0.01, y: -0.03, z: -0.005 },
|
localPosition: { x: -0.01, y: -0.03, z: -0.005 }
|
||||||
color: { red: 255, green: 0, blue: 255 },
|
|
||||||
solid: true
|
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
key: "VREdit.colorTool.swatch2Color",
|
key: "VREdit.colorTool.swatch2Color",
|
||||||
property: "color"
|
property: "color",
|
||||||
// Default value is set in properties, above.
|
defaultValue: { red: 255, green: 0, blue: 255 }
|
||||||
},
|
},
|
||||||
command: {
|
command: {
|
||||||
method: "setColorPerSwatch",
|
method: "setColorPerSwatch",
|
||||||
|
@ -341,14 +337,12 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
type: "swatch",
|
type: "swatch",
|
||||||
properties: {
|
properties: {
|
||||||
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
||||||
localPosition: { x: -0.035, y: -0.005, z: -0.005 },
|
localPosition: { x: -0.035, y: -0.005, z: -0.005 }
|
||||||
color: { red: 255, green: 255, blue: 0 },
|
|
||||||
solid: true
|
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
key: "VREdit.colorTool.swatch3Color",
|
key: "VREdit.colorTool.swatch3Color",
|
||||||
property: "color"
|
property: "color",
|
||||||
// Default value is set in properties, above.
|
defaultValue: { red: 255, green: 255, blue: 0 }
|
||||||
},
|
},
|
||||||
command: {
|
command: {
|
||||||
method: "setColorPerSwatch",
|
method: "setColorPerSwatch",
|
||||||
|
@ -364,14 +358,12 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
type: "swatch",
|
type: "swatch",
|
||||||
properties: {
|
properties: {
|
||||||
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
||||||
localPosition: { x: -0.01, y: -0.005, z: -0.005 },
|
localPosition: { x: -0.01, y: -0.005, z: -0.005 }
|
||||||
color: { red: 255, green: 0, blue: 0 },
|
|
||||||
solid: true
|
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
key: "VREdit.colorTool.swatch4Color",
|
key: "VREdit.colorTool.swatch4Color",
|
||||||
property: "color"
|
property: "color",
|
||||||
// Default value is set in properties, above.
|
defaultValue: { red: 255, green: 0, blue: 0 }
|
||||||
},
|
},
|
||||||
command: {
|
command: {
|
||||||
method: "setColorPerSwatch",
|
method: "setColorPerSwatch",
|
||||||
|
@ -387,14 +379,12 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
type: "swatch",
|
type: "swatch",
|
||||||
properties: {
|
properties: {
|
||||||
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
||||||
localPosition: { x: -0.035, y: 0.02, z: -0.005 },
|
localPosition: { x: -0.035, y: 0.02, z: -0.005 }
|
||||||
color: { red: 0, green: 255, blue: 0 },
|
|
||||||
solid: true
|
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
key: "VREdit.colorTool.swatch5Color",
|
key: "VREdit.colorTool.swatch5Color",
|
||||||
property: "color"
|
property: "color",
|
||||||
// Default value is set in properties, above.
|
defaultValue: { red: 0, green: 255, blue: 0 }
|
||||||
},
|
},
|
||||||
command: {
|
command: {
|
||||||
method: "setColorPerSwatch",
|
method: "setColorPerSwatch",
|
||||||
|
@ -410,14 +400,12 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
type: "swatch",
|
type: "swatch",
|
||||||
properties: {
|
properties: {
|
||||||
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
||||||
localPosition: { x: -0.01, y: 0.02, z: -0.005 },
|
localPosition: { x: -0.01, y: 0.02, z: -0.005 }
|
||||||
color: { red: 0, green: 0, blue: 255 },
|
|
||||||
solid: true
|
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
key: "VREdit.colorTool.swatch6Color",
|
key: "VREdit.colorTool.swatch6Color",
|
||||||
property: "color"
|
property: "color",
|
||||||
// Default value is set in properties, above.
|
defaultValue: { red: 0, green: 0, blue: 255 }
|
||||||
},
|
},
|
||||||
command: {
|
command: {
|
||||||
method: "setColorPerSwatch",
|
method: "setColorPerSwatch",
|
||||||
|
@ -434,12 +422,11 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
properties: {
|
properties: {
|
||||||
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
||||||
localPosition: { x: -0.035, y: 0.045, z: -0.005 }
|
localPosition: { x: -0.035, y: 0.045, z: -0.005 }
|
||||||
// Default to empty swatch.
|
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
key: "VREdit.colorTool.swatch7Color",
|
key: "VREdit.colorTool.swatch7Color",
|
||||||
property: "color"
|
property: "color"
|
||||||
// Default value is set in properties, above.
|
// Default to empty swatch.
|
||||||
},
|
},
|
||||||
command: {
|
command: {
|
||||||
method: "setColorPerSwatch",
|
method: "setColorPerSwatch",
|
||||||
|
@ -456,12 +443,11 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
properties: {
|
properties: {
|
||||||
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
dimensions: { x: 0.02, y: 0.02, z: 0.01 },
|
||||||
localPosition: { x: -0.01, y: 0.045, z: -0.005 }
|
localPosition: { x: -0.01, y: 0.045, z: -0.005 }
|
||||||
// Default to empty swatch.
|
|
||||||
},
|
},
|
||||||
setting: {
|
setting: {
|
||||||
key: "VREdit.colorTool.swatch8Color",
|
key: "VREdit.colorTool.swatch8Color",
|
||||||
property: "color"
|
property: "color"
|
||||||
// Default value is set in properties, above.
|
// Default to empty swatch.
|
||||||
},
|
},
|
||||||
command: {
|
command: {
|
||||||
method: "setColorPerSwatch",
|
method: "setColorPerSwatch",
|
||||||
|
@ -807,7 +793,7 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
if (optionsItems[i].setting) {
|
if (optionsItems[i].setting) {
|
||||||
optionsSettings[optionsItems[i].id] = { key: optionsItems[i].setting.key };
|
optionsSettings[optionsItems[i].id] = { key: optionsItems[i].setting.key };
|
||||||
value = Settings.getValue(optionsItems[i].setting.key);
|
value = Settings.getValue(optionsItems[i].setting.key);
|
||||||
if (value === "") {
|
if (value === "" && optionsItems[i].setting.defaultValue) {
|
||||||
value = optionsItems[i].setting.defaultValue;
|
value = optionsItems[i].setting.defaultValue;
|
||||||
}
|
}
|
||||||
if (value !== "") {
|
if (value !== "") {
|
||||||
|
|
Loading…
Reference in a new issue