Fix T87671: Copy attributes: Copy weights operator errors on non-mesh
objects
This commit is contained in:
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
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue