mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-04-06 17:31:09 +08:00
Fix material instances in face properties editor not applying to all cubes
This commit is contained in:
parent
65bf903fef
commit
b9b3a1afa3
@ -4225,7 +4225,15 @@ Interface.definePanels(function() {
|
||||
startInputMaterialInstance(event) {
|
||||
Undo.initEdit({elements: Cube.selected, uv_only: true})
|
||||
},
|
||||
endInputMaterialInstance(event) {
|
||||
endInputMaterialInstance(event, fkey) {
|
||||
let value = this.mappable_elements[0]?.faces[fkey]?.material_name;
|
||||
if (typeof value == 'string') {
|
||||
for (let element of this.mappable_elements) {
|
||||
if (element.faces[fkey]) {
|
||||
element.faces[fkey].material_name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Undo.finishEdit('Change material instances');
|
||||
},
|
||||
showInfoBox(title, text) {
|
||||
@ -4329,7 +4337,7 @@ Interface.definePanels(function() {
|
||||
title="${tl('uv_editor.face_properties.material_instance')}"
|
||||
v-model="mappable_elements[0].faces[key].material_name"
|
||||
@focus="startInputMaterialInstance($event)"
|
||||
@focusout="endInputMaterialInstance($event)"
|
||||
@focusout="endInputMaterialInstance($event, key)"
|
||||
>
|
||||
</template>
|
||||
</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user