diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-16 16:01:17 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-16 17:43:14 +0300 |
commit | 901868a4b2fc6e70d9c74119d97c57de132859a3 (patch) | |
tree | 94f96b6fd5f8a1ec509c6551f504cad958c1688f /blenderkit/ui.py | |
parent | 2e5b7a4a044ab982af66def583ae16bb563a1357 (diff) |
Update for Depsgraph API changes
Addresses new behavior of object.to_mesh().
This is corresponding part for D4875.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4876
Diffstat (limited to 'blenderkit/ui.py')
-rw-r--r-- | blenderkit/ui.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/blenderkit/ui.py b/blenderkit/ui.py index fd475af9..b0ac9209 100644 --- a/blenderkit/ui.py +++ b/blenderkit/ui.py @@ -1242,8 +1242,10 @@ class AssetBarOperator(bpy.types.Operator): target_object = object.name # create final mesh to extract correct material slot depsgraph = bpy.context.evaluated_depsgraph_get() - temp_mesh = object.evaluated_get(depsgraph).to_mesh() + object_eval = object.evaluated_get(depsgraph) + temp_mesh = object_eval.to_mesh() target_slot = temp_mesh.polygons[face_index].material_index + object_eval.to_mesh_clear() else: self.report({'WARNING'}, "Invalid or library object as input:") target_object = '' |