Skip to content

Commit b3032a2

Browse files
committed
🛠️ Fix RP resource locations using the wrong name
- Fix texture resource location cache not clearing after exporting, causing textures with the same UUID in different projects to conflict, and use the wrong resource location.
1 parent 40cb99b commit b3032a2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/mods/exportOverActionMod.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { BLUEPRINT_CODEC, BLUEPRINT_FORMAT } from '../blueprintFormat'
22
import { PACKAGE } from '../constants'
33
import { createBlockbenchMod } from '../util/moddingTools'
4-
import { translate } from '../util/translation'
54

65
createBlockbenchMod(
76
`${PACKAGE.name}:exportOverAction`,
@@ -22,10 +21,7 @@ createBlockbenchMod(
2221
console.error(
2322
`Failed to export Animated Java Blueprint, file location '${path}' does not exist!`
2423
)
25-
Blockbench.showMessageBox({
26-
title: translate('error.blueprint_export_path_doesnt_exist.title'),
27-
message: translate('error.blueprint_export_path_doesnt_exist', path),
28-
})
24+
BLUEPRINT_CODEC.export()
2925
}
3026
} else {
3127
BLUEPRINT_CODEC.export()

src/systems/exporter.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,8 @@ export async function exportProject(forceSave = true) {
160160
}
161161

162162
settingsDialog.close(0)
163+
164+
// Verify that all textures have unique IDs
165+
163166
await actuallyExportProject(forceSave)
164167
}

src/systems/rigRenderer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,8 @@ export function renderRig(modelExportFolder: string, textureExportFolder: string
732732
rig.variantModels[variant.name] = renderVariantModels(variant, rig)
733733
}
734734

735+
TEXTURE_RESOURCE_LOCATION_CACHE.clear()
736+
735737
console.timeEnd('Rendering rig took')
736738
console.log('Rendered rig:', rig)
737739
return rig

0 commit comments

Comments
 (0)