Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] Plugin inside the Blender is not reloading #6

Open
kimagin opened this issue Dec 21, 2024 · 2 comments
Open

[Issue] Plugin inside the Blender is not reloading #6

kimagin opened this issue Dec 21, 2024 · 2 comments

Comments

@kimagin
Copy link

kimagin commented Dec 21, 2024

After successfully been able to open, close, and read the console info of the plugin, I was not able to successfully hot reload the plugin while I'm working.

The environment

  • NVIM v0.11.0-dev Build type: Release
  • Lazy and Mason as installer
  • Python 3.13.1
  • WSL2 with Ubuntu 23.10 on Windows 11
    [ symlink to Blender ]

The Issue

image

  • I receive the error [Blender.nvim] No RPC client attached to the running task , when I use the command BlenderReload

  • In addition, I was not able to recreate the nice auto reload workflow that you've showcased in the video.

  • While I don't use dap, but as soon as I enable it, I will receive config errors.

Steps that I've done

  1. First, I've configured the plugin and installed all the dependencies via Lazy :
return {
  {
    "b0o/blender.nvim",
    dependencies = {
      "MunifTanjim/nui.nvim",
      "grapp-dev/nui-components.nvim",
      -- Optional dependencies for debugging support
      { "mfussenegger/nvim-dap", optional = true },
      { "LiadOz/nvim-dap-repl-highlights", optional = true },
    },
    config = function()
      require("blender").setup({
        profiles = {
          {
            name = "Blender 4.3",
            cmd = "/mnt/c/Program Files/Blender Foundation/Blender 4.3/blender.exe",
            env = {},
            use_launcher = true,
            extra_args = {},
            enable_dap = false,
            watch = true,
          },
        },
        dap = {
          enabled = false,
        },
        notify = {
          enabled = true,
          verbosity = "INFO",
        },
        watch = {
          enabled = true,
        },
        ui = {
          output_panel = {
            height = 0.25,
          },
        },
      })
    end,
  },
}

image

  1. As you suggested in the README.md , I've enabled a virtual environment and I used your initial template to test the environment.

  2. Installed uv and run uv sync

  3. Opened nvim from inside the venv

  4. Opened the file that I wanted to modify and made basic modifications.

  5. Tried the command :Blender & :BlenderLaunch (both working and opening Blender in Windows)

  6. Saved the file and ran .scripts/build_addon.sh in order to build the package

  7. Installed the plugin manually from the dist folder in to the open instance of Blender

  8. Tried to modify the code and save again without any success to recreate the auto reload that was presented in the demo.

Additional Steps

image

  • I've tried to manually add some options beyond the documentation such as rpc, change the verbosity, adding arguments to blender command.
  • I've done everything without a virtual environment
  • I've upgraded pynvim to the latest version
  • I've tried the same steps with older blender versions.

At the end, I think this plugin is a gem for vim enthusiasts and I will be looking forward to find a solution to run it properly.

@b0o
Copy link
Owner

b0o commented Dec 21, 2024

I suspect this has to do with running Neovim in WSL and Blender in Windows, which is a combination I haven't tested. Could you please share the full logs in the output tab? That may help identify what's going on.

I don't have a Windows installation to test with myself. Maybe @HeffU can give some advice on how to set it up?

Side note:

  1. Saved the file and ran .scripts/build_addon.sh in order to build the package

Assuming the plugin is working as intended, this should not be necessary during development. It's only needed when you're ready to distribute a .zip to end users.

@HeffU
Copy link
Contributor

HeffU commented Dec 26, 2024

I'm afraid I have only tried running things from powershell and not via WSL.

I don't run windows too often, but I have run into issues with WSL and network configs in the past, around port forwarding between the networks. Might be worth double-checking how your version and config of WSL is handling that.

As suggested above, any and all logs you can dig up could be useful (on either side, nvim or blender)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants