diff --git a/editor/i18n/en/assets.js b/editor/i18n/en/assets.js index 73d9d43a5b..623b1c9b87 100644 --- a/editor/i18n/en/assets.js +++ b/editor/i18n/en/assets.js @@ -43,6 +43,7 @@ module.exports = { mipFilterTip: 'Mip Filter', wrapModeSTip: 'Wrap Mode S', wrapModeTTip: 'Wrap Mode T', + bakeReflectionConvolution: 'Bake Reflection Convolution', faceSize: { name: 'Face Size', title: 'Size of each cube face. If not specified, or specified as 0, the default size, which is the nearest power of two to (image.width)/4, is used.', diff --git a/editor/i18n/zh/assets.js b/editor/i18n/zh/assets.js index beb74b34b1..1aa0331391 100644 --- a/editor/i18n/zh/assets.js +++ b/editor/i18n/zh/assets.js @@ -43,6 +43,7 @@ module.exports = { mipFilterTip: 'Mip Filter', wrapModeSTip: 'Wrap Mode S', wrapModeTTip: 'Wrap Mode T', + bakeReflectionConvolution: 'Bake Reflection Convolution', faceSize: { name: 'Face Size', title: diff --git a/editor/inspector/assets/erp-texture-cube.js b/editor/inspector/assets/erp-texture-cube.js index b3a134f376..e1450d5000 100644 --- a/editor/inspector/assets/erp-texture-cube.js +++ b/editor/inspector/assets/erp-texture-cube.js @@ -1,4 +1,4 @@ -exports.template = ` +exports.template = /* html */`
@@ -8,7 +8,7 @@ exports.template = ` value="i18n:ENGINE.assets.erpTextureCube.anisotropy" > - @@ -19,7 +19,7 @@ exports.template = ` value="i18n:ENGINE.assets.erpTextureCube.faceSize.name" > - @@ -96,6 +96,15 @@ exports.template = ` + + + + + +
`; @@ -114,6 +123,7 @@ exports.$ = { mipfilter: '#mipfilter', wrapModeS: '#wrapModeS', wrapModeT: '#wrapModeT', + mipBakeMode: '#mipBakeMode', }; exports.ready = function() { @@ -209,6 +219,16 @@ const Elements = { this.updateReadonly(this.$.wrapModeT); }, }, + mipBakeMode: { + ready() { + this.$.mipBakeMode.addEventListener('change', this.dataChange.bind(this, 'mipBakeMode')); + }, + update() { + this.$.mipBakeMode.value = this.meta.userData.mipBakeMode === 1 ? true : false; + this.updateInvalid(this.$.mipBakeMode, 'mipBakeMode'); + this.updateReadonly(this.$.mipBakeMode); + }, + }, }; @@ -227,8 +247,12 @@ exports.methods = { } }, dataChange(key, event) { + let value = event.target.value; + if (key === 'mipBakeMode') { + value = event.target.value ? 1 : 0; + } this.metaList.forEach((meta) => { - meta.userData[key] = event.target.value || undefined; + meta.userData[key] = value || undefined; }); this.dispatch('change');