diff --git a/css/dialogs.css b/css/dialogs.css index 4d850409b..70f5374b9 100644 --- a/css/dialogs.css +++ b/css/dialogs.css @@ -147,6 +147,9 @@ .dialog_bar > label { width: var(--max_label_width); } + .dialog_bar > .molang_input { + width: calc(100% - var(--max_label_width)); + } /*.dialog_bar::after { content: ""; clear: both; @@ -1493,6 +1496,7 @@ dialog#edit_bedrock_binding > .dialog_wrapper > .dialog_content { color: var(--color-subtle_text); margin-left: auto; cursor: inherit; + overflow-wrap: anywhere; } diff --git a/css/panels.css b/css/panels.css index 3c16b43c3..253e1fd8d 100644 --- a/css/panels.css +++ b/css/panels.css @@ -2677,6 +2677,7 @@ span.controller_state_section_info { padding: 2px; min-height: 160px; max-height: 232px; + line-height: 0; } #palette_list .color { display: inline-block; diff --git a/js/animations/animation_controllers.js b/js/animations/animation_controllers.js index 49cadc4ac..b4b8c89ee 100644 --- a/js/animations/animation_controllers.js +++ b/js/animations/animation_controllers.js @@ -178,7 +178,8 @@ class AnimationControllerState { if (this.transitions.length) { object.transitions = this.transitions.map(transition => { let state = this.controller.states.find(s => s.uuid == transition.target); - return new oneLiner({[state ? state.name : 'missing_state']: transition.condition}) + let condition = transition.condition.replace(/\n/g, ''); + return new oneLiner({[state ? state.name : 'missing_state']: condition}) }) } if (this.blend_transition) object.blend_transition = this.blend_transition; @@ -1723,7 +1724,7 @@ Interface.definePanels(() => {
- ` + `, + mounted() { + if (typeof this.min == 'string') console.warn('Argument "min" should be set as a numeric property via "v-bind:"') + if (typeof this.max == 'string') console.warn('Argument "max" should be set as a numeric property via "v-bind:"') + if (typeof this.step == 'string') console.warn('Argument "step" should be set as a numeric property via "v-bind:"') + } }) Vue.component('dynamic-icon', { props: { diff --git a/js/io/codec.js b/js/io/codec.js index a76fe5dcd..410986fe4 100644 --- a/js/io/codec.js +++ b/js/io/codec.js @@ -106,7 +106,8 @@ class Codec extends EventSystem { } async export() { if (Object.keys(this.export_options).length) { - await this.promptExportOptions(); + let result = await this.promptExportOptions(); + if (result === null) return; } Blockbench.export({ resource_id: 'model', diff --git a/js/io/formats/fbx.js b/js/io/formats/fbx.js index e89858f42..bdb525e82 100644 --- a/js/io/formats/fbx.js +++ b/js/io/formats/fbx.js @@ -1051,7 +1051,8 @@ var codec = new Codec('fbx', { }, async export() { if (Object.keys(this.export_options).length) { - await this.promptExportOptions(); + let result = await this.promptExportOptions(); + if (result === null) return; } var scope = this; if (isApp) { diff --git a/js/io/formats/gltf.js b/js/io/formats/gltf.js index 27f789493..6364a9dc9 100644 --- a/js/io/formats/gltf.js +++ b/js/io/formats/gltf.js @@ -345,7 +345,8 @@ var codec = new Codec('gltf', { } }, async export() { - await this.promptExportOptions(); + let options = await this.promptExportOptions(); + if (options === null) return; let content = await this.compile(); await new Promise(r => setTimeout(r, 20)); Blockbench.export({ diff --git a/js/io/io.js b/js/io/io.js index 98287a56e..919760ab8 100644 --- a/js/io/io.js +++ b/js/io/io.js @@ -127,8 +127,12 @@ async function loadImages(files, event) { if (img.naturalHeight == img.naturalWidth && [64, 128].includes(img.naturalWidth)) { options.minecraft_skin = 'format.skin'; } - if (Project && !Format.image_editor && Condition(Panels.textures.condition)) { - options.texture = 'action.import_texture'; + if (Project && Condition(Panels.textures.condition)) { + if (Format.image_editor) { + options.texture = 'message.load_images.add_image'; + } else { + options.texture = 'action.import_texture'; + } } if (Project && (!Project.box_uv || Format.optional_box_uv)) { options.extrude_with_cubes = 'dialog.extrude.title'; @@ -138,9 +142,12 @@ async function loadImages(files, event) { if (method == 'texture') { let new_textures = []; Undo.initEdit({textures: new_textures}); - files.forEach(function(f) { + files.forEach(function(f, i) { let tex = new Texture().fromFile(f).add().fillParticle(); new_textures.push(tex); + if (Format.image_editor && i == 0) { + tex.select(); + } }); Undo.finishEdit('Add texture'); diff --git a/js/outliner/cube.js b/js/outliner/cube.js index d93bfc5b6..4f07b423e 100644 --- a/js/outliner/cube.js +++ b/js/outliner/cube.js @@ -748,9 +748,11 @@ class Cube extends OutlinerElement { } else if (scope.autouv === 1) { function calcAutoUV(face, size) { - var sx = scope.faces[face].uv[0] - var sy = scope.faces[face].uv[1] - var rot = scope.faces[face].rotation + size[0] = Math.abs(size[0]); + size[1] = Math.abs(size[1]); + var sx = scope.faces[face].uv[0]; + var sy = scope.faces[face].uv[1]; + var rot = scope.faces[face].rotation; //Match To Rotation if (rot === 90 || rot === 270) { diff --git a/js/outliner/group.js b/js/outliner/group.js index 415b8b69b..e2b69f509 100644 --- a/js/outliner/group.js +++ b/js/outliner/group.js @@ -262,7 +262,6 @@ class Group extends OutlinerNode { return array; } showContextMenu(event) { - Prop.active_panel = 'outliner' if (this.locked) return this; if (Group.selected != this) this.select(event); this.menu.open(event, this) diff --git a/js/outliner/outliner.js b/js/outliner/outliner.js index c794b3a19..1341449b5 100644 --- a/js/outliner/outliner.js +++ b/js/outliner/outliner.js @@ -369,7 +369,6 @@ class OutlinerElement extends OutlinerNode { return this; } showContextMenu(event) { - Prop.active_panel = 'outliner' if (this.locked) return this; if (!this.selected) { this.select() diff --git a/js/plugin_loader.js b/js/plugin_loader.js index 268c22c40..4b87bdf72 100644 --- a/js/plugin_loader.js +++ b/js/plugin_loader.js @@ -419,7 +419,8 @@ class Plugin { this.unload() this.tags.empty(); this.dependencies.empty(); - Plugins.all.remove(this) + Plugins.all.remove(this); + this.details = null; if (this.source == 'file') { this.loadFromFile({path: this.path}, false) @@ -791,10 +792,14 @@ async function loadInstalledPlugins() { } } else if (plugin.source == 'url') { - var instance = new Plugin(plugin.id, {disabled: plugin.disabled}); - install_promises.push(instance.loadFromURL(plugin.path, false)); - load_counter++; - console.log(`🧩🌐 Loaded plugin "${plugin.id || plugin.path}" from URL`); + if (plugin.path) { + var instance = new Plugin(plugin.id, {disabled: plugin.disabled}); + install_promises.push(instance.loadFromURL(plugin.path, false)); + load_counter++; + console.log(`🧩🌐 Loaded plugin "${plugin.id || plugin.path}" from URL`); + } else { + Plugins.installed.remove(plugin); + } } else { if (Plugins.all.find(p => p.id == plugin.id)) { @@ -1300,7 +1305,7 @@ BARS.defineActions(function() {