Compare commits
19 Commits
version-1.
...
version-1.
Author | SHA1 | Date | |
---|---|---|---|
28f68c6fbf | |||
b00cb233cc | |||
2142e9e7fc | |||
1dea802932 | |||
077bd1abdb | |||
5a2c528681 | |||
53b12376d1 | |||
8495868ea6 | |||
cf810de41b | |||
c457767edf | |||
985b3f6a7d | |||
a45bf3cd5c | |||
3789742cc8 | |||
58f374e175 | |||
99e90e1008 | |||
dd83d3ee60 | |||
e74e014c66 | |||
01541f181e | |||
a69f4d3fd9 |
@@ -1,11 +1,12 @@
|
|||||||
# Blender Cloud changelog
|
# 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
|
- 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.
|
- Flamenco: Support for Flamenco Manager settings versioning + for settings version 2.
|
||||||
When using Blender Cloud Add-on 1.12 or older, Flamenco Server will automatically convert the
|
When using Blender Cloud Add-on 1.12 or older, Flamenco Server will automatically convert the
|
||||||
Manager settings to version 1.
|
Manager settings to version 1.
|
||||||
|
- More Blender 2.80 compatibility fixes
|
||||||
|
|
||||||
|
|
||||||
## Version 1.12 (2019-03-25)
|
## Version 1.12 (2019-03-25)
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
bl_info = {
|
bl_info = {
|
||||||
'name': 'Blender Cloud',
|
'name': 'Blender Cloud',
|
||||||
"author": "Sybren A. Stüvel, Francesco Siddi, Inês Almeida, Antony Riakiotakis",
|
"author": "Sybren A. Stüvel, Francesco Siddi, Inês Almeida, Antony Riakiotakis",
|
||||||
'version': (1, 13, 1),
|
'version': (1, 13, 5),
|
||||||
'blender': (2, 80, 0),
|
'blender': (2, 80, 0),
|
||||||
'location': 'Addon Preferences panel, and Ctrl+Shift+Alt+A anywhere for texture browser',
|
'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 '
|
'description': 'Texture library browser and Blender Sync. Requires the Blender ID addon '
|
||||||
|
@@ -63,6 +63,7 @@ from pillarsdk.projects import Project
|
|||||||
from pillarsdk import exceptions as sdk_exceptions
|
from pillarsdk import exceptions as sdk_exceptions
|
||||||
|
|
||||||
from bpy.types import Operator, Panel, AddonPreferences
|
from bpy.types import Operator, Panel, AddonPreferences
|
||||||
|
import bl_ui.space_sequencer
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -639,8 +640,7 @@ class ATTRACT_OT_open_meta_blendfile(AttractOperatorMixin, Operator):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return AttractOperatorMixin.poll(context) and \
|
return bool(any(cls.filename_from_metadata(s) for s in context.selected_sequences))
|
||||||
bool(any(cls.filename_from_metadata(s) for s in context.selected_sequences))
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def filename_from_metadata(strip):
|
def filename_from_metadata(strip):
|
||||||
@@ -946,25 +946,31 @@ class ATTRACT_OT_project_open_in_browser(Operator):
|
|||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
def draw_strip_movie_meta(self, context):
|
class ATTRACT_PT_strip_metadata(bl_ui.space_sequencer.SequencerButtonsPanel, Panel):
|
||||||
strip = active_strip(context)
|
bl_label = "Metadata"
|
||||||
if not strip:
|
bl_parent_id = "SEQUENCER_PT_source"
|
||||||
return
|
bl_category = "Strip"
|
||||||
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
|
||||||
meta = strip.get('metadata', None)
|
def draw(self, context):
|
||||||
if not meta:
|
strip = active_strip(context)
|
||||||
return None
|
if not strip:
|
||||||
|
return
|
||||||
|
|
||||||
box = self.layout.column(align=True)
|
meta = strip.get('metadata', None)
|
||||||
row = box.row(align=True)
|
if not meta:
|
||||||
fname = meta.get('BLEND_FILE', None) or None
|
return None
|
||||||
if fname:
|
|
||||||
row.label(text='Original Blendfile: %s' % fname)
|
box = self.layout.column(align=True)
|
||||||
row.operator(ATTRACT_OT_open_meta_blendfile.bl_idname,
|
row = box.row(align=True)
|
||||||
text='', icon='FILE_BLEND')
|
fname = meta.get('BLEND_FILE', None) or None
|
||||||
sfra = meta.get('START_FRAME', '?')
|
if fname:
|
||||||
efra = meta.get('END_FRAME', '?')
|
row.label(text='Original Blendfile: %s' % fname)
|
||||||
box.label(text='Original Frame Range: %s-%s' % (sfra, efra))
|
row.operator(ATTRACT_OT_open_meta_blendfile.bl_idname,
|
||||||
|
text='', icon='FILE_BLEND')
|
||||||
|
sfra = meta.get('START_FRAME', '?')
|
||||||
|
efra = meta.get('END_FRAME', '?')
|
||||||
|
box.label(text='Original Frame Range: %s-%s' % (sfra, efra))
|
||||||
|
|
||||||
|
|
||||||
def activate():
|
def activate():
|
||||||
@@ -1023,8 +1029,6 @@ def register():
|
|||||||
name="Status")
|
name="Status")
|
||||||
bpy.types.Sequence.atc_order = bpy.props.IntProperty(name="Order")
|
bpy.types.Sequence.atc_order = bpy.props.IntProperty(name="Order")
|
||||||
|
|
||||||
bpy.types.SEQUENCER_PT_edit.append(draw_strip_movie_meta)
|
|
||||||
|
|
||||||
for cls in _rna_classes:
|
for cls in _rna_classes:
|
||||||
bpy.utils.register_class(cls)
|
bpy.utils.register_class(cls)
|
||||||
|
|
||||||
|
@@ -435,7 +435,7 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
|||||||
|
|
||||||
# Pop out some settings so that settings of irrelevant Managers are excluded.
|
# Pop out some settings so that settings of irrelevant Managers are excluded.
|
||||||
flamenco_managers_settings = project_settings.pop('flamenco_managers_settings', {})
|
flamenco_managers_settings = project_settings.pop('flamenco_managers_settings', {})
|
||||||
flamenco_manager_settings = flamenco_managers_settings.pop(manager_id)
|
flamenco_manager_settings = flamenco_managers_settings.pop(manager_id, '-unknown-')
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
'_meta': {'version': 2},
|
'_meta': {'version': 2},
|
||||||
|
@@ -12,7 +12,10 @@ class Manager(List, Find):
|
|||||||
|
|
||||||
@functools.lru_cache(maxsize=1)
|
@functools.lru_cache(maxsize=1)
|
||||||
def _path_replacements(self) -> list:
|
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
|
settings_version = self.settings_version or 1
|
||||||
try:
|
try:
|
||||||
settings_func = getattr(self, '_path_replacements_v%d' % settings_version)
|
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; '
|
raise RuntimeError('This manager has unsupported settings version %d; '
|
||||||
'upgrade Blender Cloud add-on')
|
'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]]:
|
def _path_replacements_v1(self) -> typing.List[typing.Tuple[str, str]]:
|
||||||
import platform
|
import platform
|
||||||
@@ -68,13 +77,7 @@ class Manager(List, Find):
|
|||||||
assert isinstance(some_path, pathlib.PurePath), \
|
assert isinstance(some_path, pathlib.PurePath), \
|
||||||
'some_path should be a PurePath, not %r' % some_path
|
'some_path should be a PurePath, not %r' % some_path
|
||||||
|
|
||||||
def by_length(item):
|
for varname, path in self._path_replacements():
|
||||||
return -len(item[1]), item[1]
|
|
||||||
|
|
||||||
replacements = self._path_replacements()
|
|
||||||
replacements.sort(key=by_length)
|
|
||||||
|
|
||||||
for varname, path in replacements:
|
|
||||||
replacement = self.PurePlatformPath(path)
|
replacement = self.PurePlatformPath(path)
|
||||||
try:
|
try:
|
||||||
relpath = some_path.relative_to(replacement)
|
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."""
|
"""Bind a Blender image to a GL texture slot."""
|
||||||
bgl.glActiveTexture(bgl.GL_TEXTURE0)
|
bgl.glActiveTexture(bgl.GL_TEXTURE0)
|
||||||
bgl.glBindTexture(bgl.GL_TEXTURE_2D, texture.bindcode)
|
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):
|
def bind_texture(texture: bpy.types.Image):
|
||||||
"""Bind a Blender image to a GL texture slot."""
|
"""Bind a Blender image to a GL texture slot."""
|
||||||
bgl.glBindTexture(bgl.GL_TEXTURE_2D, texture.bindcode[0])
|
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
|
texture = self.icon
|
||||||
if texture:
|
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
|
assert not err, 'OpenGL error: %i' % err
|
||||||
|
|
||||||
# ------ TEXTURE ---------#
|
# ------ TEXTURE ---------#
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# Primary requirements:
|
# Primary requirements:
|
||||||
-e git+https://github.com/sybrenstuvel/cachecontrol.git@sybren-filecache-delete-crash-fix#egg=CacheControl
|
-e git+https://github.com/sybrenstuvel/cachecontrol.git@sybren-filecache-delete-crash-fix#egg=CacheControl
|
||||||
lockfile==0.12.2
|
lockfile==0.12.2
|
||||||
pillarsdk==1.7.0
|
pillarsdk==1.8.0
|
||||||
wheel==0.29.0
|
wheel==0.29.0
|
||||||
blender-asset-tracer==1.1.1
|
blender-asset-tracer==1.1.1
|
||||||
|
|
||||||
|
6
setup.py
6
setup.py
@@ -123,8 +123,8 @@ class BuildWheels(Command):
|
|||||||
"""Downloads a wheel from PyPI and saves it in self.wheels_path."""
|
"""Downloads a wheel from PyPI and saves it in self.wheels_path."""
|
||||||
|
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
'pip', 'download',
|
sys.executable, '-m', 'pip',
|
||||||
'--no-deps',
|
'download', '--no-deps',
|
||||||
'--dest', str(self.wheels_path),
|
'--dest', str(self.wheels_path),
|
||||||
requirement[0]
|
requirement[0]
|
||||||
])
|
])
|
||||||
@@ -236,7 +236,7 @@ setup(
|
|||||||
'wheels': BuildWheels},
|
'wheels': BuildWheels},
|
||||||
name='blender_cloud',
|
name='blender_cloud',
|
||||||
description='The Blender Cloud addon allows browsing the Blender Cloud from Blender.',
|
description='The Blender Cloud addon allows browsing the Blender Cloud from Blender.',
|
||||||
version='1.13.1',
|
version='1.13.5',
|
||||||
author='Sybren A. Stüvel',
|
author='Sybren A. Stüvel',
|
||||||
author_email='sybren@stuvel.eu',
|
author_email='sybren@stuvel.eu',
|
||||||
packages=find_packages('.'),
|
packages=find_packages('.'),
|
||||||
|
@@ -19,4 +19,4 @@ echo git commit -m \'Bumped version to $VERSION\' setup.py blender_cloud/__init_
|
|||||||
echo git tag -a version-$VERSION -m \'Tagged version $VERSION\'
|
echo git tag -a version-$VERSION -m \'Tagged version $VERSION\'
|
||||||
echo
|
echo
|
||||||
echo "To build a distribution ZIP:"
|
echo "To build a distribution ZIP:"
|
||||||
echo python setup.py bdist
|
echo python3 setup.py bdist
|
||||||
|
Reference in New Issue
Block a user