firebelley / godot-export

Automatically exports your Godot games.
MIT License
460 stars 53 forks source link

Support for Blender files #104

Closed telmotrooper closed 1 year ago

telmotrooper commented 1 year ago

Godot 4.0 allows importing 3D scenes straight from .blend files, which makes for far faster iteration on meshes and materials.

For this to work, the setting Editor > Editor Settings... > FileSystem > Import > Blender > Blender 3 Path must be set in the editor pointing to a directory containing the Blender executable.

Are there plans for supporting this feature in Godot Export? As of now the pipeline for my game is generating incomplete builds where said meshes simply do not show.

image

firebelley commented 1 year ago

It should already be supported. You need to install blender in the Github workflow and then supply the path to blender using a custom editor settings file. You can check your local editor settings file to see what the setting for the blender path is.

If that doesn't work, feel free to reopen this issue.

telmotrooper commented 1 year ago

In case it's useful for anybody in the future, this is how I got it working (this step must be before Export game):

    - name: Download and setup Blender
      run: |
        wget https://mirrors.ocf.berkeley.edu/blender/release/Blender3.4/blender-3.4.1-linux-x64.tar.xz
        tar xvf blender-*.tar.xz && mv -v $(ls -d */ | grep blender) $HOME/blender
        echo "Blender is at: $(cd $HOME/blender && pwd)"
        mkdir -pv ~/.config/godot
        echo -e "[gd_resource type=\"EditorSettings\" format=3]\n\n[resource]\nfilesystem/import/blender/blender3_path = \"$HOME/blender\"" > ~/.config/godot/editor_settings-4.tres
        cat ~/.config/godot/editor_settings-4.tres
killpond commented 6 months ago

In case it's useful for anybody in the future, this is how I got it working (this step must be before Export game):

    - name: Download and setup Blender
      run: |
        wget https://mirrors.ocf.berkeley.edu/blender/release/Blender3.4/blender-3.4.1-linux-x64.tar.xz
        tar xvf blender-*.tar.xz && mv -v $(ls -d */ | grep blender) $HOME/blender
        echo "Blender is at: $(cd $HOME/blender && pwd)"
        mkdir -pv ~/.config/godot
        echo -e "[gd_resource type=\"EditorSettings\" format=3]\n\n[resource]\nfilesystem/import/blender/blender3_path = \"$HOME/blender\"" > ~/.config/godot/editor_settings-4.tres
        cat ~/.config/godot/editor_settings-4.tres

Amazing, thanks @telmotrooper Worked a charm!