87 Commits

Author SHA1 Message Date
b70ab9678b BlenderID addon stores subclient token in different key now 2016-04-13 15:37:41 +02:00
a6256bd47b Switched to using subclient-specific authentication tokens. 2016-04-12 16:59:34 +02:00
29230f09e7 More streamlined interface with Pillar.
Using a semaphore to ensure requests to Pillar aren't too parallel,
so that we can cancel requests faster.
2016-04-01 18:47:06 +02:00
2c4c102302 Use the new Blender ID API 2016-04-01 17:16:29 +02:00
5396fd765d Better reporting when the user is not logged in. 2016-04-01 14:11:30 +02:00
1bb32033b6 Using new Blender ID addon public API 2016-04-01 14:11:12 +02:00
3a69f1fcb4 Less restrictive permissions for texture directory 2016-03-31 12:01:41 +02:00
ac29d49450 Per-BlenderID-user cache.
Different users might have different access rights, and thus access
to different information.
2016-03-22 15:20:22 +01:00
394a4f4764 Include 'map type' in filename
Map types are 'col', 'spec', 'bump' etc.
2016-03-22 14:47:55 +01:00
9e939dfd03 Added some filename sanitation 2016-03-22 14:31:34 +01:00
6b84dcf282 Added downloading of all files belonging to one texture. 2016-03-22 14:31:29 +01:00
db10201cd3 Faster cancelling of thumbnail downloads.
I forgot to pass the 'future' object to the download_texture_thumbnail
function, and as such it wasn't notified of cancellations.
2016-03-22 11:30:00 +01:00
c679809c18 Removed some unnecessary code. 2016-03-22 10:51:45 +01:00
0b4a1a7098 Only download a file once per Blender session. 2016-03-22 10:41:35 +01:00
5f3a83737c Slight tweak 2016-03-21 17:43:25 +01:00
3352d405c9 Redownload if file size is not what it should be. 2016-03-21 17:36:43 +01:00
7df27426ef Caching of texture thumbnails.
Based on HTTP headers stored in sidecar files.
2016-03-21 17:21:51 +01:00
e4cd6643b0 Removed unused code. 2016-03-21 15:50:03 +01:00
6bf8300948 Don't attempt thumbnail download when we receive an error HTTP code 2016-03-21 11:47:29 +01:00
5c2beaf7b2 Browsing now uses node objects, instead of just node UUID
This made the browsing code slightly simpler, and reduces the number
of Pillar queries. The list of nodes visited to end up at the current node
is also stored, so that we can easily go back up.
2016-03-21 11:46:47 +01:00
5f43b355b0 Renamed blender_cloud.cache to blender_cloud.http_cache. 2016-03-21 09:32:10 +01:00
5039a33053 Switched caching to CacheControl + pillar module usable without Blender
Making the blender_cloud.pillar and blender_cloud.cache modules usable
without Blender required some moving of the code, from __init__.py to
blender.py.

CacheControl requires the lockfile package, which increases the number
of bundled wheel files to 3. Those are now managed by
blender_cloud.wheels.load_wheels(). The wheels are only loaded if the
Python installation doesn't yet contain the required packages. This allows
development with virtualenv-installed packages, debugging in the IDE, etc.
2016-03-18 16:53:52 +01:00
9267faac8e Add caching at HTTP level.
This uses Reqests-Cache, which should be installed on the PYTHONPATH or
provided as a wheel in blender_cache/requests_cache-*.whl. In the latter
case, it'll be automatically added to sys.path.
2016-03-18 14:03:25 +01:00
5730f43848 Allow downloading to non-existant directory 2016-03-15 15:35:28 +01:00
7520421083 Download in larger chunks 2016-03-15 15:35:18 +01:00
012239a6c6 make is_cancelled() None-safe 2016-03-15 15:35:06 +01:00
e60853a211 Separated getting thumbnail info from downloading the thumbnail
Also added a TODO for future reference.
2016-03-15 14:23:11 +01:00
5e237bea22 Explicitly support cancelling tasks.
The 'cancelled' status is now tracked by a Future that's passed to
different asychronous tasks. That way it is possible to cancel all
running tasks before browsing another Pillar node.
2016-03-15 14:05:54 +01:00
0174c28075 Setting up and using Python's logging framework.
It's dubious whether logging.basicConfig() should be called here, so
that call will probably be moved somewhere else.
2016-03-15 13:47:21 +01:00
e32d7de7a6 Earlier calling of thumbnail_loading callback
This means that some information isn't available to the callback yet,
but it can show the filename & spinner logo much sooner.
2016-03-14 18:12:29 +01:00
59401d9c41 Moved GUI to 3D viewport
We now draw the GUI using OpenGL in Python. This allows for much more
control on the Python side. It's still a prototype, and allows us to
test the features without depending on C support in Blender itself.
GUI code was taken from the Asset Flinger addon.
2016-03-14 17:23:56 +01:00
8533ac83ba Added parallel downloading of thumbnails.
By using asyncio.gather, all thumbnail-downloading tasks are queued
simultaneously, and downloaded in parallel by the task executor.
2016-03-14 09:33:43 +01:00
b274faf12c Transitioned from synchronous to asynchronous
Using the new 'async def' functionality in Python 3.5!
Still crappy GUI, we're going to replace that.
2016-03-11 17:52:12 +01:00
01b73a0439 Added browsing group_texture nodes
Added downloading of thumbnails too. Still primitive, thumbs are
re-downloaded every time and all I/O blocks the Blender UI.
2016-03-09 17:34:37 +01:00
6a5c8c7e9a Added downloading of texture thumbnails
The downloading is multi-threaded, and streams directly to disk in 10kB
chunks.
2016-03-09 14:09:06 +01:00
80c9f15192 Added querying of project by URL and nodes for project/node 2016-03-08 17:56:32 +01:00
b39ce06c75 Initial checkin
Allows authentication with the Blender ID addon, and requires the Pillar
SDK, but doesn't do much else.
2016-03-08 16:22:20 +01:00