Skip to content

Commit bff8e1d

Browse files
committed
Version bump to 2.0.1; updated example 05 with the new assets location
1 parent ba2bc0e commit bff8e1d

7 files changed

Lines changed: 29 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# blendify 2.0.1
2+
This update is a minor release that incorporates a UV map leakage fix ([pull request #11](https://github.com/ptrvilya/blendify/pull/11)) and moves the example 05 assets location.
3+
14
# blendify 2.0.0
25
We are excited to announce the second major release of blendify.
36

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ SMPL-X [README](https://github.com/vchoutas/smplx#downloading-the-model).
123123

124124

125125
## Changelog
126-
The most recent version of blendify is **2.0.0**. The update introduced some breaking changes that are
126+
The most recent version of blendify is **2.0.1**. The 2.0.0 update introduced some breaking changes that are
127127
summarized alongside the overview of the new features in the [CHANGELOG](CHANGELOG.md) file.
128128

129129
## Citation

blendify/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"__version__"
88
]
99

10-
VERSION = (2, 0, 0) # PEP 386
10+
VERSION = (2, 0, 1) # PEP 386
1111
__version__ = ".".join([str(x) for x in VERSION])
1212

1313
scene = Scene()

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ SMPL-X [README](https://github.com/vchoutas/smplx#downloading-the-model).
143143

144144

145145
## Changelog
146-
The most recent version of Blendify is **2.0.0**. The update introduced some breaking changes that are
146+
The most recent version of Blendify is **2.0.1**. The 2.0.0 update introduced some breaking changes that are
147147
summarized alongside the overview of the new features in the [CHANGELOG](https://github.com/ptrvilya/blendify/blob/main/CHANGELOG.md) file.
148148

149149
## Citation

docs/pip_readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ SMPL-X [README](https://github.com/vchoutas/smplx#downloading-the-model).
6868

6969

7070
## Changelog
71-
The most recent version of Blendify is **2.0.0**. The update introduced some breaking changes that are
71+
The most recent version of Blendify is **2.0.1**. The 2.0.0 update introduced some breaking changes that are
7272
summarized alongside the overview of the new features in the [CHANGELOG](https://github.com/ptrvilya/blendify/blob/main/CHANGELOG.md) file.
7373

7474
## Citation

examples/05_smpl_movement.py

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import argparse
22
import json
33
import os
4-
from urllib import request
5-
from loguru import logger
6-
74
import numpy as np
85
import trimesh
9-
from scipy.spatial.transform import Rotation
6+
import tempfile
7+
import zipfile
8+
from urllib import request
9+
from loguru import logger
1010
from videoio import VideoWriter
1111

1212
from blendify import scene
@@ -132,25 +132,27 @@ def main(args):
132132
arguments = parser.parse_args()
133133

134134

135-
def download(fileurl, filename):
135+
def download_zipped(file_url, target_dir):
136136
progress_report = lambda block_num, block_size, total_size: print(
137-
f"Downloading {filename}: {block_num * block_size / 2 ** 20:.2f}/{total_size / 2 ** 20:.2f}MB", end="\r")
138-
if not os.path.isfile(filename) or request.urlopen(fileurl).length != os.stat(filename).st_size:
139-
request.urlretrieve(fileurl, filename, progress_report)
140-
print()
137+
f"Downloading data: {block_num * block_size / 2 ** 20:.2f}/{total_size / 2 ** 20:.2f}MB", end="\r")
138+
if not os.path.isdir(target_dir):
139+
with tempfile.TemporaryDirectory() as tmpdirname:
140+
# Download the zipped file to a temporary directory
141+
request.urlretrieve(file_url, os.path.join(tmpdirname, "data.zip"), progress_report)
142+
print()
143+
os.makedirs(target_dir)
144+
# Unzip the file to the target directory
145+
logger.info("Extracting the data")
146+
with zipfile.ZipFile(os.path.join(tmpdirname, "data.zip"), 'r') as zip_ref:
147+
zip_ref.extractall(target_dir)
148+
else:
149+
logger.info(f"Assets folder {target_dir} exist, skipping download.")
141150

142151

143152
# Downloading assets if needed
144153
if not arguments.skip_download:
145-
os.makedirs("assets/05_smpl_movement", exist_ok=True)
146-
# The scene mesh was generated from HPS dataset (Etage6 pointcloud) using blendify.utils.pointcloud.meshify_pc_from_file
147-
download("https://nextcloud.mpi-klsb.mpg.de/index.php/s/AESiBaXXyagNmrE/download",
148-
"assets/05_smpl_movement/scene_texture.jpg")
149-
download("https://nextcloud.mpi-klsb.mpg.de/index.php/s/QCjTsJqSSrNb5nJ/download",
150-
"assets/05_smpl_movement/scene_mesh.ply")
151-
download("https://nextcloud.mpi-klsb.mpg.de/index.php/s/dNtecaSTPkYoKey/download",
152-
"assets/05_smpl_movement/scene_face_uvmap.npy")
153-
download("https://nextcloud.mpi-klsb.mpg.de/index.php/s/a2SYDcoPc5FoCwe/download",
154-
"assets/05_smpl_movement/animation_data.json")
154+
# The scene mesh was generated from HPS dataset (MPI_Etage6 pointcloud) using blendify.utils.pointcloud.meshify_pc_from_file
155+
download_zipped("https://github.com/ptrvilya/blendify/releases/download/v2.0.1/05_smpl_movement_assets.zip",
156+
"assets/05_smpl_movement")
155157

156158
main(arguments)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from pkg_resources import DistributionNotFound, get_distribution
22
from setuptools import setup, find_packages
3-
version = '2.0.0'
3+
version = '2.0.1'
44

55
with open("docs/pip_readme.md", "r") as fi:
66
long_description = fi.read()

0 commit comments

Comments
 (0)