Skip to content

Commit

Permalink
fix(pyrender): Only enables headless pyrender under linux
Browse files Browse the repository at this point in the history
  • Loading branch information
cornerfarmer committed Aug 26, 2023
1 parent 9fb4adb commit 614957a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion blenderproc/python/writer/BopWriterUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import cv2
import bpy
from mathutils import Matrix
import sys

from blenderproc.python.types.MeshObjectUtility import MeshObject, get_all_mesh_objects
from blenderproc.python.utility.Utility import Utility, resolve_path
Expand All @@ -22,7 +23,9 @@
from blenderproc.python.utility.SetupUtility import SetupUtility
from blenderproc.python.utility.MathUtility import change_target_coordinate_frame_of_transformation_matrix

os.environ['PYOPENGL_PLATFORM'] = 'egl'
# EGL is not available under windows
if sys.platform in ["linux", "linux2"]:
os.environ['PYOPENGL_PLATFORM'] = 'egl'
# pylint: disable=wrong-import-position
import pyrender
# pylint: enable=wrong-import-position
Expand Down

0 comments on commit 614957a

Please sign in to comment.