Unverified Commit 44286088 authored by Florian Brandes's avatar Florian Brandes
Browse files

blender: add materialx

parent b9ca7691
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
  libxkbcommon,
  llvmPackages,
  makeWrapper,
  materialx,
  mesa,
  ocl-icd,
  openal,
@@ -118,7 +119,8 @@ stdenv.mkDerivation (finalAttrs: {
          : > build_files/cmake/platform/platform_apple_xcode.cmake
          substituteInPlace source/creator/CMakeLists.txt \
            --replace-fail '${"$"}{LIBDIR}/python' \
                      '${python3}'
                      '${python3}' \
            --replace-fail '${"$"}{LIBDIR}/materialx/' '${materialx}/'
          substituteInPlace build_files/cmake/platform/platform_apple.cmake \
            --replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlicommon-static.a' \
                      '${lib.getLib brotli}/lib/libbrotlicommon.dylib' \
@@ -151,6 +153,7 @@ stdenv.mkDerivation (finalAttrs: {
      "-DWITH_FFTW3=ON"
      "-DWITH_IMAGE_OPENJPEG=ON"
      "-DWITH_INSTALL_PORTABLE=OFF"
      "-DMaterialX_DIR=${materialx}/lib/cmake/MaterialX"
      "-DWITH_MOD_OCEANSIM=ON"
      "-DWITH_OPENCOLLADA=${if colladaSupport then "ON" else "OFF"}"
      "-DWITH_OPENCOLORIO=ON"
@@ -221,6 +224,7 @@ stdenv.mkDerivation (finalAttrs: {
      libsndfile
      libtiff
      libwebp
      materialx
      opencolorio
      openexr
      openimageio
@@ -286,6 +290,7 @@ stdenv.mkDerivation (finalAttrs: {
      ps = python3Packages;
    in
    [
      materialx
      ps.numpy
      ps.requests
      ps.zstandard
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ python3Packages.buildPythonPackage rec {
  cmakeFlags = [
    (lib.cmakeBool "MATERIALX_BUILD_OIIO" true)
    (lib.cmakeBool "MATERIALX_BUILD_PYTHON" true)
    # don't build MSL shader back-end on x86_x64-darwin, as it requires a newer SDK with metal support
    (lib.cmakeBool "MATERIALX_BUILD_GEN_MSL" (stdenv.isLinux || (stdenv.isAarch64 && stdenv.isDarwin)))
  ];

  pythonImportsCheck = [ "MaterialX" ];