Skip to content

Commit

Permalink
Merge pull request #141 from outercloudstudio/master
Browse files Browse the repository at this point in the history
fix ConvertObj compiling with invalid geometry names
  • Loading branch information
outercloudstudio authored Sep 30, 2023
2 parents 212cb7a + a5d88d0 commit db5ccf0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion plugins/ConvertObj/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Convert OBJ is a compiler plugin for [Dash](https://github.com/bridge-core/dash-compiler) that converts OBJ files into the JSON format Minecraft understands.

## Installation

After installing the plugin from bridge.'s extension store, edit your project config to include the "convertObj" compiler plugin:

```
Expand All @@ -22,4 +23,4 @@ After installing the plugin from bridge.'s extension store, edit your project co

To add a new OBJ file to your project, simply add the file to your `RP/models/` folder. Place a corresponding texture with the same file name within the `RP/textures/obj/` folder (e.g. `my_model.obj` -> `my_model.png`).

You can now reference your new model as `<project namespace>:my_model` within your project.
You can now reference your new model as `geometry.<project namespace>.my_model` within your project.
2 changes: 1 addition & 1 deletion plugins/ConvertObj/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "solvedDev",
"icon": "mdi-vector-polygon",
"name": "Convert OBJ",
"version": "1.0.1",
"version": "1.0.2",
"id": "f76c1da1-1ee4-4a32-8deb-30e2d3fbc885",
"description": "Convert .obj files to Minecraft models",
"api_version": 2,
Expand Down
2 changes: 1 addition & 1 deletion plugins/ConvertObj/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default ({ options, projectConfig, fileSystem }) => {
async transform(filePath, fileContent) {
if (filePath.endsWith('.obj')) {
const fileName = filePath.split('/').pop().replace('.obj', '')
const modelId = `${namespace}:${fileName}`
const modelId = `geometry.${namespace}.${fileName}`

const texturePath = projectConfig.resolvePackPath(
'resourcePack',
Expand Down

0 comments on commit db5ccf0

Please sign in to comment.