grebtsew / FloorplanToBlender3d

Create 3d rooms in blender from floorplans.
GNU General Public License v3.0
396 stars 103 forks source link

Blender path error #9

Closed iiskakov closed 2 years ago

iiskakov commented 3 years ago

Describe the bug I am trying to run the latest version from doors-and-windows branch. The script fails when attempting to run blender. I suppose the problem is with default path. Main branch works fine with same steps.

I also tried to use:

  1. /Applications/Blender.app/Contents/MacOS/Blender since I am on Mac
  2. /usr/local/blender/blender I thought for a second that since the script runs inside docker container, may be that it needs local path for docker installed blender.

Both didn't seem to work.

To Reproduce Steps to reproduce the behavior:

  1. git clone --branch doors-and-windows https://github.com/grebtsew/FloorplanToBlender3d.git
  2. docker-compose run ftb
  3. Press enter several times (all defaults)
  4. See error

Expected behavior I expect this to create a floorplan.blend file with windows and doors

Screenshots

image

Desktop (please complete the following information):

grebtsew commented 3 years ago

Hello @iiskakov

Which version of blender are you using?

I have not myself tried running on MacOS so I would guess the problem is that Blender is installed somewhere else. The default values are for windows so it makes sense that it won't work out of the box.

The /usr/local/blender/blender path is for linux and ubuntu.

Have you tried the path:

/Applications/Blender.app/Contents/MacOS/ (almost like the one you already tried)

As suggested here.

If that doesn't work i would suggest trying a couple more paths. If that don't work I can setup a virtual machine to try myself.

This is a great issue, as I can add some extra information about how to run on MacOS when we solved it.

Please let me know if you solve the issue yourself.

Cheers, @grebtsew

dogfootruler-kr commented 3 years ago

Hey @iiskakov ,

If you use the docker-compose command then blender path should be /usr/local/blender/blender and there is also a small error in the const.py file, TARGET_PATH should be set to "/Target/" instead of "./Target".

FYI: If you run it locally on MacOS the blender path should be /Applications/Blender.app/Contents/MacOS/Blender

Cheers

grebtsew commented 3 years ago

Hi again,

I think the issue is solved with todays update. Now the implementation will select blender default path depending on your host os. This way the dockerfile also gets a little cleaner.

  1. pull latest from the branch.
  2. remove your .config.ini file if it exists. (it is no longer being tracked in git)
  3. run the implementation, hopefully it will work. Please try it out and notify me if it works.

Notice the new variables:

MAC_DEFAULT_BLENDER_INSTALL_PATH = "/Applications/Blender.app/Contents/MacOS/Blender"
LINUX_DEFAULT_BLENDER_INSTALL_PATH = "/usr/local/blender/blender"
WIN_DEFAULT_BLENDER_INSTALL_PATH = 'C:\\Program Files\\Blender Foundation\\Blender 2.90\\blender.exe'

Many thanks to @dogfootruler-kr for bringing the TARGET_PATH problem to my attention. It should now also be fixed.

Cheers!

grebtsew commented 2 years ago

Hi,

This is now merged into Master/Main branch I will therefore close this issue.

Cheers, @grebtsew