Compare commits
8 Commits
version-1.
...
version-1.
Author | SHA1 | Date | |
---|---|---|---|
a45bf3cd5c | |||
3789742cc8 | |||
58f374e175 | |||
99e90e1008 | |||
dd83d3ee60 | |||
e74e014c66 | |||
01541f181e | |||
a69f4d3fd9 |
@@ -1,6 +1,6 @@
|
||||
# Blender Cloud changelog
|
||||
|
||||
## Version 1.13 (in development)
|
||||
## Version 1.13 (2019-04-18)
|
||||
|
||||
- Upgraded BAT to 1.1.1 for a compatibility fix with Blender 2.79
|
||||
- Flamenco: Support for Flamenco Manager settings versioning + for settings version 2.
|
||||
|
@@ -21,7 +21,7 @@
|
||||
bl_info = {
|
||||
'name': 'Blender Cloud',
|
||||
"author": "Sybren A. Stüvel, Francesco Siddi, Inês Almeida, Antony Riakiotakis",
|
||||
'version': (1, 13, 1),
|
||||
'version': (1, 13, 3),
|
||||
'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 '
|
||||
|
@@ -1023,7 +1023,12 @@ def register():
|
||||
name="Status")
|
||||
bpy.types.Sequence.atc_order = bpy.props.IntProperty(name="Order")
|
||||
|
||||
bpy.types.SEQUENCER_PT_edit.append(draw_strip_movie_meta)
|
||||
try:
|
||||
panel = bpy.types.SEQUENCER_PT_info_input
|
||||
except AttributeError:
|
||||
# Blender 2.79 and older:
|
||||
panel = bpy.types.SEQUENCER_PT_edit
|
||||
panel.append(draw_strip_movie_meta)
|
||||
|
||||
for cls in _rna_classes:
|
||||
bpy.utils.register_class(cls)
|
||||
|
@@ -12,7 +12,10 @@ class Manager(List, Find):
|
||||
|
||||
@functools.lru_cache(maxsize=1)
|
||||
def _path_replacements(self) -> list:
|
||||
"""Defer to _path_replacements_vN() to get path replacement vars."""
|
||||
"""Defer to _path_replacements_vN() to get path replacement vars.
|
||||
|
||||
Returns a list of tuples (variable name, variable value).
|
||||
"""
|
||||
settings_version = self.settings_version or 1
|
||||
try:
|
||||
settings_func = getattr(self, '_path_replacements_v%d' % settings_version)
|
||||
@@ -20,7 +23,13 @@ class Manager(List, Find):
|
||||
raise RuntimeError('This manager has unsupported settings version %d; '
|
||||
'upgrade Blender Cloud add-on')
|
||||
|
||||
return settings_func()
|
||||
def longest_value_first(item):
|
||||
var_name, var_value = item
|
||||
return -len(var_value), var_value, var_name
|
||||
|
||||
replacements = settings_func()
|
||||
replacements.sort(key=longest_value_first)
|
||||
return replacements
|
||||
|
||||
def _path_replacements_v1(self) -> typing.List[typing.Tuple[str, str]]:
|
||||
import platform
|
||||
@@ -68,13 +77,7 @@ class Manager(List, Find):
|
||||
assert isinstance(some_path, pathlib.PurePath), \
|
||||
'some_path should be a PurePath, not %r' % some_path
|
||||
|
||||
def by_length(item):
|
||||
return -len(item[1]), item[1]
|
||||
|
||||
replacements = self._path_replacements()
|
||||
replacements.sort(key=by_length)
|
||||
|
||||
for varname, path in replacements:
|
||||
for varname, path in self._path_replacements():
|
||||
replacement = self.PurePlatformPath(path)
|
||||
try:
|
||||
relpath = some_path.relative_to(replacement)
|
||||
|
@@ -105,3 +105,8 @@ def bind_texture(texture: bpy.types.Image):
|
||||
"""Bind a Blender image to a GL texture slot."""
|
||||
bgl.glActiveTexture(bgl.GL_TEXTURE0)
|
||||
bgl.glBindTexture(bgl.GL_TEXTURE_2D, texture.bindcode)
|
||||
|
||||
|
||||
def load_texture(texture: bpy.types.Image) -> int:
|
||||
"""Load the texture, return OpenGL error code."""
|
||||
return texture.gl_load()
|
||||
|
@@ -88,3 +88,8 @@ def aabox_with_texture(v1: Float2, v2: Float2):
|
||||
def bind_texture(texture: bpy.types.Image):
|
||||
"""Bind a Blender image to a GL texture slot."""
|
||||
bgl.glBindTexture(bgl.GL_TEXTURE_2D, texture.bindcode[0])
|
||||
|
||||
|
||||
def load_texture(texture: bpy.types.Image) -> int:
|
||||
"""Load the texture, return OpenGL error code."""
|
||||
return texture.gl_load(filter=bgl.GL_NEAREST, mag=bgl.GL_NEAREST)
|
||||
|
@@ -164,7 +164,7 @@ class MenuItem:
|
||||
|
||||
texture = self.icon
|
||||
if texture:
|
||||
err = texture.gl_load(filter=bgl.GL_NEAREST, mag=bgl.GL_NEAREST)
|
||||
err = draw.load_texture(texture)
|
||||
assert not err, 'OpenGL error: %i' % err
|
||||
|
||||
# ------ TEXTURE ---------#
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Primary requirements:
|
||||
-e git+https://github.com/sybrenstuvel/cachecontrol.git@sybren-filecache-delete-crash-fix#egg=CacheControl
|
||||
lockfile==0.12.2
|
||||
pillarsdk==1.7.0
|
||||
pillarsdk==1.8.0
|
||||
wheel==0.29.0
|
||||
blender-asset-tracer==1.1.1
|
||||
|
||||
|
2
setup.py
2
setup.py
@@ -236,7 +236,7 @@ setup(
|
||||
'wheels': BuildWheels},
|
||||
name='blender_cloud',
|
||||
description='The Blender Cloud addon allows browsing the Blender Cloud from Blender.',
|
||||
version='1.13.1',
|
||||
version='1.13.3',
|
||||
author='Sybren A. Stüvel',
|
||||
author_email='sybren@stuvel.eu',
|
||||
packages=find_packages('.'),
|
||||
|
Reference in New Issue
Block a user