[Bf-extensions-cvs] [3d9a13e0] blender-v2.82-release: BlenderKit: fix material drag drop

Vilém Duha noreply at git.blender.org
Mon Feb 10 20:56:40 CET 2020


Commit: 3d9a13e0d50ee72605348f2276b287040336ef6b
Author: Vilém Duha
Date:   Mon Feb 10 20:56:28 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rBA3d9a13e0d50ee72605348f2276b287040336ef6b

BlenderKit: fix material drag drop

was broken due to inverted conditiion

===================================================================

M	blenderkit/ui.py

===================================================================

diff --git a/blenderkit/ui.py b/blenderkit/ui.py
index ffeaf4f6..b0753a08 100644
--- a/blenderkit/ui.py
+++ b/blenderkit/ui.py
@@ -1589,7 +1589,7 @@ class AssetBarOperator(bpy.types.Operator):
                         else:
                             # first, test if object can have material applied.
                             # TODO add other types here if droppable.
-                            if object is None or object.is_library_indirect and object.type == 'MESH':
+                            if object is not None and not object.is_library_indirect and object.type == 'MESH':
                                 target_object = object.name
                                 # create final mesh to extract correct material slot
                                 depsgraph = bpy.context.evaluated_depsgraph_get()



More information about the Bf-extensions-cvs mailing list