Compare commits

..

No commits in common. "master" and "version-1.21" have entirely different histories.

9 changed files with 17 additions and 61 deletions

View File

@ -1,28 +1,5 @@
# Blender Cloud changelog
## Version 1.25 (2022-02-25)
- Compatibility with Blender 3.1 (Python 3.10).
- Bump blender-asset-tracer to version 1.11, for UDIM support.
## Version 1.24 (2022-02-04)
- Bump blender-asset-tracer version 1.8 → 1.10, for fixing a bug where files were doubly-compressed.
## Version 1.23 (2021-11-09)
- Bump blender-asset-tracer version 1.7 → 1.8, for compatibility with sending read-only blend files to Flamenco.
## Version 1.22 (2021-11-05)
- Fix Windows incompatibility when using Shaman URLs as job storage path.
- Bump blender-asset-tracer version 1.6 → 1.7, for compatibility with files compressed by Blender 3.0.
## Version 1.21 (2021-07-27)
- Bump blender-asset-tracer version 1.5.1 → 1.6, for better compatibility with Geometry Nodes.

View File

@ -21,7 +21,7 @@
bl_info = {
"name": "Blender Cloud",
"author": "Sybren A. Stüvel, Francesco Siddi, Inês Almeida, Antony Riakiotakis",
"version": (1, 25),
"version": (1, 21),
"blender": (2, 80, 0),
"location": "Addon Preferences panel, and Ctrl+Shift+Alt+A anywhere for texture browser",
"description": "Texture library browser and Blender Sync. Requires the Blender ID addon "

View File

@ -56,11 +56,8 @@ def setup_asyncio_executor():
from . import pillar
# Python 3.8 deprecated the 'loop' parameter, 3.10 removed it.
kwargs = {"loop": loop} if sys.version_info < (3, 8) else {}
# No more than this many Pillar calls should be made simultaneously
pillar.pillar_semaphore = asyncio.Semaphore(3, **kwargs)
pillar.pillar_semaphore = asyncio.Semaphore(3, loop=loop)
def kick_async_loop(*args) -> bool:

View File

@ -668,8 +668,6 @@ class ATTRACT_OT_open_meta_blendfile(AttractOperatorMixin, Operator):
@classmethod
def poll(cls, context):
if context.selected_sequences is None:
return False
return bool(
any(cls.filename_from_metadata(s) for s in context.selected_sequences)
)

View File

@ -42,10 +42,11 @@ else:
from .. import blender
import bpy
from bpy.types import Operator, PropertyGroup
from bpy.types import AddonPreferences, Operator, WindowManager, Scene, PropertyGroup
from bpy.props import (
StringProperty,
EnumProperty,
PointerProperty,
BoolProperty,
IntProperty,
)
@ -270,7 +271,7 @@ def is_file_inside_job_storage(prefs, current_file: typing.Union[str, Path]) ->
if isinstance(current_file, str):
# Shaman URLs are always remote, so the current file cannot be in there.
if is_shaman_url(prefs.flamenco_job_file_path):
if is_shaman_url(current_file):
return False
current_file = Path(current_file)
@ -954,7 +955,7 @@ async def create_job(
*,
priority: int = 50,
job_description: str = None,
start_paused=False,
start_paused=False
) -> dict:
"""Creates a render job at Flamenco Server, returning the job object as dictionary."""
@ -1007,7 +1008,7 @@ def _render_output_path(
render_image_format: str,
flamenco_render_frame_range: str,
*,
include_rel_path: bool = True,
include_rel_path: bool = True
) -> typing.Optional[PurePath]:
"""Cached version of render_output_path()

View File

@ -25,7 +25,6 @@ import logging
from contextlib import closing, contextmanager
import urllib.parse
import pathlib
import sys
import requests.adapters
import requests.packages.urllib3.util.retry
@ -262,17 +261,14 @@ async def pillar_call(pillar_func, *args, caching=True, **kwargs):
)
loop = asyncio.get_event_loop()
# Python 3.8 deprecated the 'loop' parameter, 3.10 removed it.
kwargs = {"loop": loop} if sys.version_info < (3, 8) else {}
# Use explicit calls to acquire() and release() so that we have more control over
# how long we wait and how we handle timeouts.
try:
await asyncio.wait_for(pillar_semaphore.acquire(), timeout=10, **kwargs)
await asyncio.wait_for(pillar_semaphore.acquire(), timeout=10, loop=loop)
except asyncio.TimeoutError:
log.info("Waiting for semaphore to call %s", pillar_func.__name__)
try:
await asyncio.wait_for(pillar_semaphore.acquire(), timeout=50, **kwargs)
await asyncio.wait_for(pillar_semaphore.acquire(), timeout=50, loop=loop)
except asyncio.TimeoutError:
raise RuntimeError("Timeout waiting for Pillar Semaphore!")
@ -652,11 +648,9 @@ async def fetch_texture_thumbs(
for texture_node in texture_nodes
)
# Python 3.8 deprecated the 'loop' parameter, 3.10 removed it.
kwargs = {"loop": asyncio.get_event_loop()} if sys.version_info < (3, 8) else {}
# raises any exception from failed handle_texture_node() calls.
await asyncio.gather(*coros, **kwargs)
loop = asyncio.get_event_loop()
await asyncio.gather(*coros, loop=loop)
log.info("fetch_texture_thumbs: Done downloading texture thumbnails")
@ -935,10 +929,8 @@ async def download_texture(
)
downloaders.append(dlr)
# Python 3.8 deprecated the 'loop' parameter, 3.10 removed it.
kwargs = {"loop": asyncio.get_event_loop()} if sys.version_info < (3, 8) else {}
return await asyncio.gather(*downloaders, return_exceptions=True, **kwargs)
loop = asyncio.get_event_loop()
return await asyncio.gather(*downloaders, return_exceptions=True, loop=loop)
async def upload_file(

View File

@ -58,12 +58,8 @@ def wheel_filename(fname_prefix: str) -> str:
if not wheels:
raise RuntimeError("Unable to find wheel at %r" % path_pattern)
# If there are multiple wheels that match, load the last-modified one.
# Alphabetical sorting isn't going to cut it since BAT 1.10 was released.
def modtime(filename: str) -> int:
return os.stat(filename).st_mtime
wheels.sort(key=modtime)
# If there are multiple wheels that match, load the latest one.
wheels.sort()
return wheels[-1]
@ -72,8 +68,3 @@ def load_wheels():
load_wheel("lockfile", "lockfile")
load_wheel("cachecontrol", "CacheControl")
load_wheel("pillarsdk", "pillarsdk")
if __name__ == "__main__":
wheel = wheel_filename("blender_asset_tracer")
print(f"Wheel: {wheel}")

View File

@ -3,7 +3,7 @@
lockfile==0.12.2
pillarsdk==1.8.0
wheel==0.29.0
blender-asset-tracer==1.11
blender-asset-tracer==1.6
# Secondary requirements:
asn1crypto==0.24.0

View File

@ -250,7 +250,7 @@ setup(
},
name="blender_cloud",
description="The Blender Cloud addon allows browsing the Blender Cloud from Blender.",
version="1.25",
version="1.21",
author="Sybren A. Stüvel",
author_email="sybren@stuvel.eu",
packages=find_packages("."),