Fix #2114 UV size label does not update

This commit is contained in:
JannisX11 2023-11-29 11:11:34 +01:00
parent dd8e8eb372
commit 272a3485e0
2 changed files with 11 additions and 6 deletions

View File

@ -1159,6 +1159,7 @@ class Texture {
}
this.updateMaterial();
UVEditor.loadData();
if (Format.texture_mcmeta) {
if (['frame_time', 'frame_interpolate', 'frame_order_type', 'frame_order'].find(key => this[key] !== results[key])) {

View File

@ -483,6 +483,10 @@ const UVEditor = {
this.displayTools();
this.displayTools();
this.vue.box_uv = UVEditor.isBoxUV();
this.vue.uv_resolution.V2_set(
UVEditor.getUVWidth(),
UVEditor.getUVHeight()
);
this.vue.$forceUpdate();
return this;
},
@ -2106,22 +2110,22 @@ Interface.definePanels(function() {
},
watch: {
texture() {
this.uv_resolution = [
this.uv_resolution.V2_set(
UVEditor.getUVWidth(),
UVEditor.getUVHeight()
];
);
},
'texture.uv_width'(value) {
this.uv_resolution = [
this.uv_resolution.V2_set(
UVEditor.getUVWidth(),
UVEditor.getUVHeight()
];
);
},
'texture.uv_height'(value) {
this.uv_resolution = [
this.uv_resolution.V2_set(
UVEditor.getUVWidth(),
UVEditor.getUVHeight()
];
);
},
mode() {
Vue.nextTick(() => {