diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-04-21 15:56:36 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-04-27 22:14:13 +0300 |
commit | 452996ae951478853af3c1bcac3e0e1a26a6cab4 (patch) | |
tree | 8c6fe7dddfb1a1ed6118b13a8c3d3eec7e339894 | |
parent | e7acb93c89fc00a5dfffcff90ab3956a0eaf34f0 (diff) |
Fix T87671: Copy attributes: Copy weights operator errors on non-mesh
objects
-rw-r--r-- | space_view3d_copy_attributes.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/space_view3d_copy_attributes.py b/space_view3d_copy_attributes.py index da741737..93dfaa38 100644 --- a/space_view3d_copy_attributes.py +++ b/space_view3d_copy_attributes.py @@ -436,6 +436,9 @@ def obGrp(ob, active, context): def obWei(ob, active, context): + # sanity check: are source and target both mesh objects? + if ob.type != 'MESH' or active.type != 'MESH': + return('ERROR', "objects have to be of mesh type, doing nothing") me_source = active.data me_target = ob.data # sanity check: do source and target have the same amount of verts? |