Fix T87671: Copy attributes: Copy weights operator errors on non-mesh

objects
This commit is contained in:
Philipp Oeser 2021-04-21 14:56:36 +02:00
parent e7acb93c89
commit 452996ae95
Notes: blender-bot 2023-02-14 18:37:59 +01:00
Referenced by issue #87671, Addon: Copy attributes. Copy weights operator returns error
1 changed files with 3 additions and 0 deletions

View File

@ -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?