Page MenuHomeFreeBSD

New port: graphics/sverchok-blender: Add-on for Blender: parametric tool for architects and designers
ClosedPublic

Authored by yuri on Jan 1 2018, 12:20 AM.
Tags
None
Referenced Files
F80188790: D13721.id37343.diff
Thu, Mar 28, 11:48 PM
Unknown Object (File)
Fri, Mar 15, 8:05 AM
Unknown Object (File)
Feb 12 2024, 2:12 AM
Unknown Object (File)
Feb 12 2024, 2:12 AM
Unknown Object (File)
Feb 12 2024, 2:12 AM
Unknown Object (File)
Feb 12 2024, 2:12 AM
Unknown Object (File)
Feb 12 2024, 2:12 AM
Unknown Object (File)
Feb 12 2024, 2:12 AM

Details

Summary

It allows to design 3D scenes in a very nice GUI visually, by constructing individual functional nodes.
Here is the screenshot: https://cloud.githubusercontent.com/assets/284644/5981635/a75e5a74-a8dd-11e4-9d1f-64e19da8f01a.png

Test Plan

Verified that Blender works fine with python-3.6, as expected.
I tried the add-on, and it also seems to work fine.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 14020
Build 14210: arc lint + arc unit

Event Timeline

This patch also makes the following supporting modifications to graphics/blender:

  • Creates Makefile.list with its own version, and python version for use by plugins
  • Updates it to python-3.6, which is currently a default version in python-3 series
  • Added USES=fortran, because plugins can use python packages built with fortran
  • Bumps PORTREVISION
yuri edited the test plan for this revision. (Show Details)

.

yuri edited the summary of this revision. (Show Details)

.

yuri retitled this revision from New port: graphics/sverchok-blender: Plugin for Blender: parametric tool for architects and designers to New port: graphics/sverchok-blender: Add-on for Blender: parametric tool for architects and designers.Jan 1 2018, 2:01 AM
yuri edited the summary of this revision. (Show Details)
yuri edited the test plan for this revision. (Show Details)

While the blender code only tests a minimum python version, newer versions aren't officially supported. v2.79 was released 12/9 using python 3.5.3. Since that release the minimum has been increased to 3.6.2 for the next release, so there has only been a couple of months testing with py3.6. See the install_deps.sh used for 2.79 and the commit made a week later updateing this to 3.6.2 for the next release.

There is no need for the cmake_Modules_FindPythonLibsUnix patch - to make the current blender build against python 3.6 all you need to add is CMAKE_ARGS+= -DPYTHON_VERSION:STRING=3.6 to the port Makefile and change USES= python:3.6 for the dependencies.

Blender doesn't use fortran and doesn't need any dependency for it. Ports like py-numpy are dependant on fortran and will have it installed. Now that flavours has hit ports I am able to add py-numpy as a dependancy, but haven't submitted that update. There have been fortran issues with using py-numpy, see bug 207750. So far the best solution seems to be to define LD_LIBRARY_PATH, personally I have a shell script in ~/bin that does this before starting blender. The addition of devel/flang may help resolve this but I haven't tested it yet. You may find this page helpful.

As for sverchok, I haven't used it a lot but the current head seems to still work fine with py3.5, the docs have only been updated today to say it requires 3.6 - math/py-numpy and www/py-requests can be installed for any python version.

While I install sverchok and animation nodes into my personal between release builds, I hadn't thought of adding them as a port, probably a good idea for both.

There is no need for the cmake_Modules_FindPythonLibsUnix patch - to make the current blender build against python 3.6 all you need to add is CMAKE_ARGS+= -DPYTHON_VERSION:STRING=3.6 to the port Makefile and change USES= python:3.6 for the dependencies.

Ok, I will update this. 3.5 seemed to be hardcoded there.

Blender doesn't use fortran and doesn't need any dependency for it. Ports like py-numpy are dependant on fortran and will have it installed.

Individual libraries using fortran can't be used unless the overall executable has been built with USES=fortran. So USES=fortran is needed.

So far the best solution seems to be to define LD_LIBRARY_PATH, personally I have a shell script in

Changing LD_LIBRARY_PATH is what USES=fortran does.

As for sverchok, I haven't used it a lot but the current head seems to still work fine with py3.5

Ports only support py3.5 for a limited subset of py-* ports, and py-requests isn't supported. py36 is considered a default python3 flavor, so we need to upgrade blender to py36.

graphics/sverchok-blender/Makefile
29

I think it would be better to install extra addons into scripts/addons_contrib to keep them separate from official release addons.

graphics/sverchok-blender/Makefile
29

Ok, I will update this.

yuri marked 2 inline comments as done.Jan 1 2018, 8:33 AM
yuri added inline comments.
graphics/sverchok-blender/Makefile
29

Blender doesn't find the add-on when it is installed into share/blender/2.79/scripts/addons_contrib/sverchok/

Simplified Python version selection according to Shane's suggestion.
The alternative path for Blender add-on didn't work. Can always change later.

yuri marked an inline comment as done.Jan 1 2018, 8:46 AM
graphics/sverchok-blender/Makefile
32

Don't use do- and post-. Do everything in the do- target.

yuri marked an inline comment as done.Jan 2 2018, 5:37 PM
graphics/sverchok-blender/Makefile
34

As you only install stuff in share/blender/${BLENDER_BL_VERSION}/scripts/addons/${PORTNAME}, I think that you should limit both find to this directory. The second find seems most bogus.

yuri marked an inline comment as done.Jan 3 2018, 5:05 PM
tcberner requested changes to this revision.Jan 9 2018, 9:17 PM

blender/Makefile.versions is missing.

This revision now requires changes to proceed.Jan 9 2018, 9:17 PM

The graphics/blender part was missing, sorry.

This revision is now accepted and ready to land.Jan 15 2018, 5:13 PM
This revision was automatically updated to reflect the committed changes.