Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into iss_1002_transparent_…
Browse files Browse the repository at this point in the history
…ccmaterials_skip
  • Loading branch information
cornerfarmer committed Dec 8, 2023
2 parents 2f839ca + 6521179 commit b46390d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions blenderproc/python/types/MeshObjectUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ def add_uv_mapping(self, projection: str, overwrite: bool = False):
"""
if not self.has_uv_mapping() or overwrite:
self.edit_mode()
bpy.ops.mesh.select_all(action='SELECT')
if projection == "cube":
bpy.ops.uv.cube_project()
elif projection == "cylinder":
Expand Down
10 changes: 8 additions & 2 deletions blenderproc/python/utility/InstallUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
from typing import Union, Tuple

if version_info.major == 3:
from urllib.request import urlretrieve
from urllib.request import urlretrieve, build_opener, install_opener
from urllib.error import URLError
else:
from urllib import urlretrieve
from urllib import urlretrieve, build_opener, install_opener
import contextlib

# pylint: disable=wrong-import-position
Expand Down Expand Up @@ -126,6 +126,12 @@ def make_sure_blender_is_installed(custom_blender_path: str, blender_install_pat
url = used_url + ".zip"
else:
raise RuntimeError(f"This system is not supported yet: {platform}")

# setting the default header, else the server does not allow the download
opener = build_opener()
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
install_opener(opener)

try:
try:
# pylint: disable=import-outside-toplevel
Expand Down
2 changes: 1 addition & 1 deletion blenderproc/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
""" Define the current BlenderProc version. """
__version__ = '2.6.1'
__version__ = '2.6.2'
4 changes: 4 additions & 0 deletions change_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

# Version History

## Version 2.6.2 6th December 2023

- Fixes blender download

## Version 2.6.1 26th August 2023

- Fixes pyrender usage on windows, EGL / headless rendering is now only used on linux
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ If don't have any data yet, BlenderProc offers download functionality for many d
* `blenderproc download blenderkit <output_dir>`: Downloads materials and models from blenderkit
* `blenderproc download cc_textures <output_dir>`: Downloads textures from cc0textures.com.
* `blenderproc download haven <output_dir>`: Downloads HDRIs, Textures and Models from polyhaven.com.
* `blenderproc download ikea <output_dir>`: Downloads the IKEA dataset. **(At the moment this dataset is not availabe!)**
* `blenderproc download ikea <output_dir>`: Downloads the IKEA dataset. **(At the moment this dataset is not availabe! Use pix3d instead, as ikea is a subset of pix3D)**
* `blenderproc download pix3d <output_dir>`: Downloads the Pix3D dataset.
* `blenderproc download scenenet <output_dir>`: Downloads the scenenet dataset.
* `blenderproc download matterport3d <output_dir>`: Downloads the Matterport3D dataset.
Expand Down

0 comments on commit b46390d

Please sign in to comment.