Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVilém Duha <vilda.novak@gmail.com>2020-12-22 16:45:40 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-12-22 16:45:51 +0300
commit10ae0f7a5a84b0d9ac8ccbb4abe97e42ab6ca9d1 (patch)
treeb742a78c088cd9baa7d1252054f5595f700dbc4b /blenderkit/bg_blender.py
parent105d485a0327976e12b34f23373079b3b2c4d834 (diff)
BlenderKit: multiple improvements:
HDR and scene asset types - These are now available when user enables experimental features in addon preferences. Refactor Upload - no Blender instance isn't launched when not needed and everything happens in a thread, so no waiting for the user when e.g. updating metadata. improve pasted asset_id string Change asset type picking interface to fit more asset types Notify user about brush mode needs Update categories file
Diffstat (limited to 'blenderkit/bg_blender.py')
-rw-r--r--blenderkit/bg_blender.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/blenderkit/bg_blender.py b/blenderkit/bg_blender.py
index a8597675..128cf457 100644
--- a/blenderkit/bg_blender.py
+++ b/blenderkit/bg_blender.py
@@ -55,7 +55,9 @@ class threadCom: # object passed to threads to read background process stdout i
def threadread(tcom):
- '''reads stdout of background process, done this way to have it non-blocking. this threads basically waits for a stdout line to come in, fills the data, dies.'''
+ '''reads stdout of background process.
+ this threads basically waits for a stdout line to come in,
+ fills the data, dies.'''
found = False
while not found:
inline = tcom.proc.stdout.readline()
@@ -155,6 +157,7 @@ process_types = (
process_sources = (
('MODEL', 'Model', 'set of objects'),
('SCENE', 'Scene', 'set of scenes'),
+ ('HDR', 'HDR', 'HDR image'),
('MATERIAL', 'Material', 'any .blend Material'),
('TEXTURE', 'Texture', 'a texture, or texture set'),
('BRUSH', 'Brush', 'brush, can be any type of blender brush'),
@@ -203,9 +206,18 @@ class KillBgProcess(bpy.types.Operator):
if tcom.process_type == self.process_type:
source = eval(tcom.eval_path)
kill = False
+ #TODO HDR - add killing of process
if source.bl_rna.name == 'Object' and self.process_source == 'MODEL':
if source.name == bpy.context.active_object.name:
kill = True
+ if source.bl_rna.name == 'Scene' and self.process_source == 'SCENE':
+ if source.name == bpy.context.scene.name:
+ kill = True
+ if source.bl_rna.name == 'Image' and self.process_source == 'HDR':
+ ui_props = bpy.context.scene.blenderkitUI
+ if source.name == ui_props.hdr_upload_image.name:
+ kill = False
+
if source.bl_rna.name == 'Material' and self.process_source == 'MATERIAL':
if source.name == bpy.context.active_object.active_material.name:
kill = True