bcongdon / bpy_lambda

🎥 A compiled binary of Blender-as-a-Python-Module (bpy) for use in AWS Lambda
MIT License
66 stars 22 forks source link

Blender 2.8 support #6

Open nestarz opened 6 years ago

nestarz commented 6 years ago

In the near future, Blender will be getting breaking changes with 2.8v (which is already available in alpha). Do you plan to support it ?

Thanks, Elias

bcongdon commented 6 years ago

Yes, I'll update this to 2.8 after it's released.

nestarz commented 5 years ago

Thanks @bcongdon, any plan for a beta support ?

bcongdon commented 5 years ago

Not currently, though I'd imagine that fairly simple changes to the Dockerfile would let you use the v2.8 beta

darknoon commented 5 years ago

Hey, I thought this project was really cool and started working on the 2.8 support: https://github.com/darknoon/bpy_lambda/tree/blender-280-py-37

Currently stuck on building OpenEXR, it can't find the Python 3.7 that's built earlier in the process: https://gist.github.com/darknoon/e5109f74f109a3f854a8a8e1eb495610

nestarz commented 5 years ago

It needs Python 2.7 to be build as stated here

Make Python 2.7 available to CMake's search path, and re-run configuration

No ?

darknoon commented 5 years ago

@nestarz I tried installing Python 2.7 as well with

RUN yum install python27 -y

but it still doesn't find it. It's not clear that OpenEXR actually needs python 2.7, just that it's looking for a version of python in the usual locations and I'm not sure our python is.

I tried setting these env variables but it seems that CMake doesn't read from the environment. I have a feeling there is something simple I'm missing!

ENV PYTHON_INCLUDE_DIR /usr/local/include/python3.7m
ENV PYTHON_LIBRARY /usr/local/lib/libpython3.7m.so
ENV PYTHON_LIBPATH /usr/local/lib

ENV OPENEXR_PYTHON_MAJOR 3
ENV OPENEXR_PYTHON_MINOR 7
darknoon commented 5 years ago

I made progress by turning off building OpenEXR python bindings with a patch to install_deps.sh

Hit this, I think I might need to use clang instead of gcc.

[ 12%] Building CXX object intern/cycles/device/CMakeFiles/cycles_device.dir/device_cpu.cpp.o
/root/blender-git/blender/intern/cycles/device/device_cpu.cpp: In member function 'void ccl::CPUDevice::path_trace(ccl::DeviceTask&, ccl::RenderTile&, ccl::KernelGlobals*)':
/root/blender-git/blender/intern/cycles/device/device_cpu.cpp:723:31: error: '_MM_DENORMALS_ZERO_ON' was not declared in this scope
   _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
                               ^
/root/blender-git/blender/intern/cycles/device/device_cpu.cpp:723:52: error: '_MM_SET_DENORMALS_ZERO_MODE' was not declared in this scope
   _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
                                                    ^
make[2]: *** [intern/cycles/device/CMakeFiles/cycles_device.dir/device_cpu.cpp.o] Error 1
make[1]: *** [intern/cycles/device/CMakeFiles/cycles_device.dir/all] Error 2
make: *** [all] Error 2
The command '/bin/sh -c cd ~/blender-git/blender_build &&     make &&     make install' returned a non-zero code: 2
michaelwills commented 5 years ago

@darknoon this was perhaps fixed upstream in March?

https://github.com/flathub/org.blender.Blender/issues/23#issuecomment-470095592

priyesh16 commented 4 years ago

Hi, any update on supporting blender 2.82?

bcongdon commented 4 years ago

@priyesh16 I've started working on it, but there's currently an issue with the install_deps.sh script.

bcongdon commented 4 years ago

This is still being worked on, but is taking much longer than I expected.

salimhb commented 4 years ago

I'm interested in getting this working and tried to do it yesterday. I did this successfully on a AWS Lightsail machine, as it's faster and easier to troubleshoot directly there. What I don't fully understand is how to create the list of libs to copy for https://github.com/bcongdon/bpy_lambda/blob/master/shim/__init__.py I've copied the same files with newer versions, but I keep getting errors about further missing .so files. I'm copying them one by one, but it's a trial and error task. Is there a better approach?

salimhb commented 4 years ago

I managed to find the files and created a PR https://github.com/bcongdon/bpy_lambda/pull/13