diff options
Diffstat (limited to 'denoise.patch')
-rw-r--r-- | denoise.patch | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/denoise.patch b/denoise.patch index 4c74a4a1690e..53dcf0c4f829 100644 --- a/denoise.patch +++ b/denoise.patch @@ -1,7 +1,32 @@ -diff -Naur BlendLuxCore-blendluxcore_v2.2/draw/viewport.py BlendLuxCore-blendluxcore_v2.2-patch/draw/viewport.py ---- BlendLuxCore-blendluxcore_v2.2/draw/viewport.py 2019-09-30 12:40:01.000000000 +0200 -+++ BlendLuxCore-blendluxcore_v2.2-patch/draw/viewport.py 2019-11-28 08:19:28.433741235 +0100 -@@ -8,6 +8,7 @@ +diff --git a/__init__.py b/__init__.py +index 1570b8a..7f0a2a1 100644 +--- a/__init__.py ++++ b/__init__.py +@@ -2,6 +2,7 @@ import bpy + import addon_utils + import platform + import os ++from shutil import which + + + _, luxblend_is_enabled = addon_utils.check("luxrender") +@@ -43,10 +44,7 @@ if platform.system() in {"Linux", "Darwin"}: + + # Make sure denoiser is executable + current_dir = os.path.dirname(os.path.realpath(__file__)) +- denoiser_path = os.path.join(current_dir, "bin", "denoise") +- if not os.access(denoiser_path, os.X_OK): +- print("Making LuxCore denoiser executable") +- os.chmod(denoiser_path, 0o755) ++ denoiser_path = which('oidnDenoise') + + try: + from .bin import pyluxcore +diff --git a/draw/viewport.py b/draw/viewport.py +index a28cf9f..f7fd34c 100644 +--- a/draw/viewport.py ++++ b/draw/viewport.py +@@ -8,6 +8,7 @@ import tempfile from ..bin import pyluxcore from .. import utils from ..utils import pfm @@ -9,13 +34,13 @@ diff -Naur BlendLuxCore-blendluxcore_v2.2/draw/viewport.py BlendLuxCore-blendlux NULL = 0 -@@ -72,8 +73,7 @@ +@@ -72,8 +73,7 @@ class FrameBuffer(object): self._albedo_file_path = self._make_denoiser_filepath("albedo") self._normal_file_path = self._make_denoiser_filepath("normal") self._denoised_file_path = self._make_denoiser_filepath("denoised") - current_dir = os.path.dirname(os.path.realpath(__file__)) - self._denoiser_path = os.path.join(os.path.dirname(current_dir), "bin", "denoise") -+ self._denoiser_path = which('denoise') ++ self._denoiser_path = which('oidnDenoise') if platform.system() == "Windows": self._denoiser_path += ".exe" self._denoiser_process = None |