Compare commits

..

4 Commits

Author SHA1 Message Date
b2522aefdb Mark 1.18 as released 2021-02-16 11:55:46 +01:00
ee20121fbd Bumped version to 1.18 2021-02-16 11:55:16 +01:00
9b2a936047 Update update_script.sh for new formatting with Black 2021-02-16 11:54:48 +01:00
1a6f54b473 Cleanup: reformat setup.py with Black
No functional changes.
2021-02-16 11:54:45 +01:00
7 changed files with 40 additions and 63 deletions

View File

@@ -1,31 +1,5 @@
# Blender Cloud changelog
## 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.
## Version 1.20 (2021-07-22)
- Bump blender-asset-tracer version 1.3.1 -> 1.5.1.
- Blender-asset-tracer "Strict Pointer Mode" disabled, to avoid issues with
not-entirely-synced library overrides.
## Version 1.19 (2021-02-23)
- Another Python 3.9+ compatibility fix.
## Version 1.18 (2021-02-16)
- Add compatibility with Python 3.9 (as used in Blender 2.93).

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, 23),
"version": (1, 18),
"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

@@ -47,7 +47,7 @@ log = logging.getLogger(__name__)
icons = None
@pyside_cache
@pyside_cache("version")
def blender_syncable_versions(self, context):
"""Returns the list of items used by SyncStatusProperties.version EnumProperty."""
@@ -117,7 +117,7 @@ class SyncStatusProperties(PropertyGroup):
self["available_blender_versions"] = new_versions
@pyside_cache
@pyside_cache("project")
def bcloud_available_projects(self, context):
"""Returns the list of items used by BlenderCloudProjectGroup.project EnumProperty."""

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,
)
@@ -53,8 +54,6 @@ from bpy.props import (
from .. import async_loop, pillar, project_specific, utils
from ..utils import pyside_cache, redraw
import blender_asset_tracer.blendfile
log = logging.getLogger(__name__)
# Global flag used to determine whether panels etc. can be drawn.
@@ -92,7 +91,7 @@ def scene_sample_count(scene) -> int:
return samples
@pyside_cache
@pyside_cache("manager")
def available_managers(self, context):
"""Returns the list of items used by a manager-selector EnumProperty."""
@@ -270,7 +269,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)
@@ -650,12 +649,6 @@ class FLAMENCO_OT_render(
self.log.debug("projdir: %s", projdir)
# Due to issues with library overrides and unsynced pointers, it's quite
# common for the Blender Animation Studio to get crashes of BAT. To avoid
# these, Strict Pointer Mode is disabled.
blender_asset_tracer.blendfile.set_strict_pointer_mode(False)
if is_shaman_url(prefs.flamenco_job_file_path):
endpoint, _ = bat_interface.parse_shaman_endpoint(
prefs.flamenco_job_file_path
@@ -954,7 +947,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 +1000,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

@@ -19,7 +19,6 @@
import json
import pathlib
import typing
from typing import Any, Dict, Optional, Tuple
def sizeof_fmt(num: int, suffix="B") -> str:
@@ -36,7 +35,7 @@ def sizeof_fmt(num: int, suffix="B") -> str:
return "%.1f Yi%s" % (num, suffix)
def find_in_path(path: pathlib.Path, filename: str) -> Optional[pathlib.Path]:
def find_in_path(path: pathlib.Path, filename: str) -> typing.Optional[pathlib.Path]:
"""Performs a breadth-first search for the filename.
Returns the path that contains the file, or None if not found.
@@ -67,29 +66,41 @@ def find_in_path(path: pathlib.Path, filename: str) -> Optional[pathlib.Path]:
return None
# Mapping from (module name, function name) to the last value returned by that function.
_pyside_cache: Dict[Tuple[str, str], Any] = {}
def pyside_cache(wrapped):
def pyside_cache(propname):
"""Decorator, stores the result of the decorated callable in Python-managed memory.
This is to work around the warning at
https://www.blender.org/api/blender_python_api_master/bpy.props.html#bpy.props.EnumProperty
"""
import functools
if callable(propname):
raise TypeError('Usage: pyside_cache("property_name")')
@functools.wraps(wrapped)
# We can't use (*args, **kwargs), because EnumProperty explicitly checks
# for the number of fixed positional arguments.
def decorator(self, context):
result = None
try:
result = wrapped(self, context)
return result
finally:
_pyside_cache[wrapped.__module__, wrapped.__name__] = result
def decorator(wrapped):
"""Stores the result of the callable in Python-managed memory.
This is to work around the warning at
https://www.blender.org/api/blender_python_api_master/bpy.props.html#bpy.props.EnumProperty
"""
import functools
@functools.wraps(wrapped)
# We can't use (*args, **kwargs), because EnumProperty explicitly checks
# for the number of fixed positional arguments.
def wrapper(self, context):
result = None
try:
result = wrapped(self, context)
return result
finally:
try:
rna_type, rna_info = self.bl_rna.__annotations__[propname]
except AttributeError:
rna_type, rna_info = getattr(self.bl_rna, propname)
rna_info["_cached_result"] = result
return wrapper
return decorator

View File

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

View File

@@ -248,9 +248,8 @@ setup(
"install_egg_info": AvoidEggInfo,
"wheels": BuildWheels,
},
name="blender_cloud",
description="The Blender Cloud addon allows browsing the Blender Cloud from Blender.",
version="1.23",
version="1.18",
author="Sybren A. Stüvel",
author_email="sybren@stuvel.eu",
packages=find_packages("."),