Compare commits
14 Commits
version-1.
...
version-1.
Author | SHA1 | Date | |
---|---|---|---|
3ed5f2c187 | |||
0be3bf7f49 | |||
f207e14664 | |||
9932003400 | |||
e7035e6f0c | |||
014a36d24e | |||
068451a7aa | |||
56fb1ec3df | |||
e93094cb88 | |||
33718a1a35 | |||
db82dbe730 | |||
8d405330ee | |||
66ddc7b47b | |||
2fa8cb4054 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,5 +1,19 @@
|
|||||||
# Blender Cloud changelog
|
# Blender Cloud changelog
|
||||||
|
|
||||||
|
## Version 1.7.4 (2017-09-05)
|
||||||
|
|
||||||
|
- Fix [T52621](https://developer.blender.org/T52621): Fixed class name collision upon add-on
|
||||||
|
registration. This is checked since Blender 2.79.
|
||||||
|
- Fix [T48852](https://developer.blender.org/T48852): Screenshot no longer shows "Communicating with
|
||||||
|
Blender Cloud".
|
||||||
|
|
||||||
|
|
||||||
|
## Version 1.7.3 (2017-08-08)
|
||||||
|
|
||||||
|
- Default to scene frame range when no frame range is given.
|
||||||
|
- Refuse to render on Flamenco before blend file is saved at least once.
|
||||||
|
- Fixed some Windows-specific issues.
|
||||||
|
|
||||||
|
|
||||||
## Version 1.7.2 (2017-06-22)
|
## Version 1.7.2 (2017-06-22)
|
||||||
|
|
||||||
|
@@ -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, 7, 2),
|
'version': (1, 7, 4),
|
||||||
'blender': (2, 77, 0),
|
'blender': (2, 77, 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 '
|
||||||
|
@@ -173,7 +173,7 @@ class AttractPollMixin:
|
|||||||
return attract_is_active
|
return attract_is_active
|
||||||
|
|
||||||
|
|
||||||
class ToolsPanel(AttractPollMixin, Panel):
|
class AttractToolsPanel(AttractPollMixin, Panel):
|
||||||
bl_label = 'Attract'
|
bl_label = 'Attract'
|
||||||
bl_space_type = 'SEQUENCE_EDITOR'
|
bl_space_type = 'SEQUENCE_EDITOR'
|
||||||
bl_region_type = 'UI'
|
bl_region_type = 'UI'
|
||||||
@@ -974,7 +974,7 @@ def register():
|
|||||||
|
|
||||||
bpy.types.SEQUENCER_PT_edit.append(draw_strip_movie_meta)
|
bpy.types.SEQUENCER_PT_edit.append(draw_strip_movie_meta)
|
||||||
|
|
||||||
bpy.utils.register_class(ToolsPanel)
|
bpy.utils.register_class(AttractToolsPanel)
|
||||||
bpy.utils.register_class(AttractShotRelink)
|
bpy.utils.register_class(AttractShotRelink)
|
||||||
bpy.utils.register_class(AttractShotDelete)
|
bpy.utils.register_class(AttractShotDelete)
|
||||||
bpy.utils.register_class(AttractStripUnlink)
|
bpy.utils.register_class(AttractStripUnlink)
|
||||||
|
@@ -20,8 +20,10 @@
|
|||||||
|
|
||||||
The preferences are managed blender.py, the rest of the Flamenco-specific stuff is here.
|
The preferences are managed blender.py, the rest of the Flamenco-specific stuff is here.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
from pathlib import Path, PurePath
|
from pathlib import Path, PurePath
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
@@ -150,6 +152,14 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
|||||||
log = logging.getLogger('%s.FLAMENCO_OT_render' % __name__)
|
log = logging.getLogger('%s.FLAMENCO_OT_render' % __name__)
|
||||||
|
|
||||||
async def async_execute(self, context):
|
async def async_execute(self, context):
|
||||||
|
# Refuse to start if the file hasn't been saved. It's okay if
|
||||||
|
# it's dirty, but we do need a filename and a location.
|
||||||
|
if not os.path.exists(context.blend_data.filepath):
|
||||||
|
self.report({'ERROR'}, 'Please save your Blend file before using '
|
||||||
|
'the Blender Cloud addon.')
|
||||||
|
self.quit()
|
||||||
|
return
|
||||||
|
|
||||||
if not await self.authenticate(context):
|
if not await self.authenticate(context):
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -192,10 +202,12 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
|||||||
|
|
||||||
# Create the job at Flamenco Server.
|
# Create the job at Flamenco Server.
|
||||||
context.window_manager.flamenco_status = 'COMMUNICATING'
|
context.window_manager.flamenco_status = 'COMMUNICATING'
|
||||||
|
|
||||||
|
frame_range = scene.flamenco_render_frame_range.strip() or scene_frame_range(context)
|
||||||
settings = {'blender_cmd': '{blender}',
|
settings = {'blender_cmd': '{blender}',
|
||||||
'chunk_size': scene.flamenco_render_fchunk_size,
|
'chunk_size': scene.flamenco_render_fchunk_size,
|
||||||
'filepath': manager.replace_path(outfile),
|
'filepath': manager.replace_path(outfile),
|
||||||
'frames': scene.flamenco_render_frame_range,
|
'frames': frame_range,
|
||||||
'render_output': manager.replace_path(render_output),
|
'render_output': manager.replace_path(render_output),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,6 +360,13 @@ class FLAMENCO_OT_render(async_loop.AsyncModalOperatorMixin,
|
|||||||
return outfile, missing_sources
|
return outfile, missing_sources
|
||||||
|
|
||||||
|
|
||||||
|
def scene_frame_range(context) -> str:
|
||||||
|
"""Returns the frame range string for the current scene."""
|
||||||
|
|
||||||
|
s = context.scene
|
||||||
|
return '%i-%i' % (s.frame_start, s.frame_end)
|
||||||
|
|
||||||
|
|
||||||
class FLAMENCO_OT_scene_to_frame_range(FlamencoPollMixin, Operator):
|
class FLAMENCO_OT_scene_to_frame_range(FlamencoPollMixin, Operator):
|
||||||
"""Sets the scene frame range as the Flamenco render frame range."""
|
"""Sets the scene frame range as the Flamenco render frame range."""
|
||||||
bl_idname = 'flamenco.scene_to_frame_range'
|
bl_idname = 'flamenco.scene_to_frame_range'
|
||||||
@@ -355,8 +374,7 @@ class FLAMENCO_OT_scene_to_frame_range(FlamencoPollMixin, Operator):
|
|||||||
bl_description = __doc__.rstrip('.')
|
bl_description = __doc__.rstrip('.')
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
s = context.scene
|
context.scene.flamenco_render_frame_range = scene_frame_range(context)
|
||||||
s.flamenco_render_frame_range = '%i-%i' % (s.frame_start, s.frame_end)
|
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -50,6 +50,7 @@ async def bam_copy(base_blendfile: Path, target_blendfile: Path,
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import os
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
@@ -76,9 +77,17 @@ async def bam_copy(base_blendfile: Path, target_blendfile: Path,
|
|||||||
else:
|
else:
|
||||||
pythonpath = wheel_pythonpath_278()
|
pythonpath = wheel_pythonpath_278()
|
||||||
|
|
||||||
|
env = {
|
||||||
|
'PYTHONPATH': pythonpath,
|
||||||
|
# Needed on Windows because http://bugs.python.org/issue8557
|
||||||
|
'PATH': os.environ['PATH'],
|
||||||
|
}
|
||||||
|
if 'SYSTEMROOT' in os.environ: # Windows http://bugs.python.org/issue20614
|
||||||
|
env['SYSTEMROOT'] = os.environ['SYSTEMROOT']
|
||||||
|
|
||||||
proc = await asyncio.create_subprocess_exec(
|
proc = await asyncio.create_subprocess_exec(
|
||||||
*args,
|
*args,
|
||||||
env={'PYTHONPATH': pythonpath},
|
env=env,
|
||||||
stdin=subprocess.DEVNULL,
|
stdin=subprocess.DEVNULL,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
|
@@ -11,21 +11,20 @@ class Manager(List, Find):
|
|||||||
|
|
||||||
@functools.lru_cache()
|
@functools.lru_cache()
|
||||||
def _sorted_path_replacements(self) -> list:
|
def _sorted_path_replacements(self) -> list:
|
||||||
import sys
|
import platform
|
||||||
|
|
||||||
if self.path_replacement is None:
|
if self.path_replacement is None:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
print('SORTING PATH REPLACEMENTS')
|
|
||||||
|
|
||||||
items = self.path_replacement.to_dict().items()
|
items = self.path_replacement.to_dict().items()
|
||||||
|
|
||||||
def by_length(item):
|
def by_length(item):
|
||||||
return -len(item[0]), item[0]
|
return -len(item[0]), item[0]
|
||||||
|
|
||||||
platform = sys.platform
|
this_platform = platform.system().lower()
|
||||||
return [(varname, platform_replacements[platform])
|
return [(varname, platform_replacements[this_platform])
|
||||||
for varname, platform_replacements in sorted(items, key=by_length)]
|
for varname, platform_replacements in sorted(items, key=by_length)
|
||||||
|
if this_platform in platform_replacements]
|
||||||
|
|
||||||
def replace_path(self, some_path: pathlib.PurePath) -> str:
|
def replace_path(self, some_path: pathlib.PurePath) -> str:
|
||||||
"""Performs path variable replacement.
|
"""Performs path variable replacement.
|
||||||
|
@@ -112,6 +112,10 @@ class PILLAR_OT_image_share(pillar.PillarOperatorMixin,
|
|||||||
async def async_execute(self, context):
|
async def async_execute(self, context):
|
||||||
"""Entry point of the asynchronous operator."""
|
"""Entry point of the asynchronous operator."""
|
||||||
|
|
||||||
|
# We don't want to influence what is included in the screen shot.
|
||||||
|
if self.target == 'SCREENSHOT':
|
||||||
|
print('Blender Cloud add-on is communicating with Blender Cloud')
|
||||||
|
else:
|
||||||
self.report({'INFO'}, 'Communicating with Blender Cloud')
|
self.report({'INFO'}, 'Communicating with Blender Cloud')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
2
setup.py
2
setup.py
@@ -232,7 +232,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.7.2',
|
version='1.7.4',
|
||||||
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('.'),
|
||||||
|
@@ -83,8 +83,13 @@ class PathReplacementTest(unittest.TestCase):
|
|||||||
|
|
||||||
def _do_test(self, test_paths, platform, pathclass):
|
def _do_test(self, test_paths, platform, pathclass):
|
||||||
self.test_manager.PurePlatformPath = pathclass
|
self.test_manager.PurePlatformPath = pathclass
|
||||||
with unittest.mock.patch('sys.platform', platform):
|
|
||||||
|
def mocked_system():
|
||||||
|
return platform
|
||||||
|
|
||||||
|
with unittest.mock.patch('platform.system', mocked_system):
|
||||||
for expected_result, input_path in test_paths:
|
for expected_result, input_path in test_paths:
|
||||||
|
as_path_instance = pathclass(input_path)
|
||||||
self.assertEqual(expected_result,
|
self.assertEqual(expected_result,
|
||||||
self.test_manager.replace_path(pathclass(input_path)),
|
self.test_manager.replace_path(as_path_instance),
|
||||||
'for input %s on platform %s' % (input_path, platform))
|
'for input %r on platform %s' % (as_path_instance, platform))
|
||||||
|
Reference in New Issue
Block a user