Skip to content

Commit af302d1

Browse files
committed
🛠️ Fix Double Default Variant
1 parent 84e18ef commit af302d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/blueprintFormat.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ export const BLUEPRINT_FORMAT = new Blockbench.ModelFormat({
524524
},
525525
},
526526

527+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
527528
onSetup(project, newModel) {
528529
if (!Project) return
529530
console.log('Animated Java Blueprint format setup')
@@ -540,9 +541,6 @@ export const BLUEPRINT_FORMAT = new Blockbench.ModelFormat({
540541

541542
Project.variants ??= []
542543
Project.last_used_export_namespace = Project.animated_java.export_namespace
543-
if (newModel || Project.variants.length === 0) {
544-
new Variant('Default', true)
545-
}
546544
const updateBoundingBoxIntervalId = setInterval(() => {
547545
updateBoundingBox()
548546
}, 500)
@@ -569,6 +567,8 @@ export const BLUEPRINT_FORMAT = new Blockbench.ModelFormat({
569567

570568
Project!.materials[TRANSPARENT_TEXTURE.uuid] = TRANSPARENT_TEXTURE_MATERIAL
571569
TRANSPARENT_TEXTURE.updateMaterial()
570+
571+
if (Variant.all.length === 0) new Variant('Default', true)
572572
Variant.selectDefault()
573573
})
574574
},

0 commit comments

Comments
 (0)