[Bf-extensions-cvs] [452996ae] blender-v2.93-release: Fix T87671: Copy attributes: Copy weights operator errors on non-mesh objects

Philipp Oeser noreply at git.blender.org
Tue Apr 27 21:18:15 CEST 2021


Commit: 452996ae951478853af3c1bcac3e0e1a26a6cab4
Author: Philipp Oeser
Date:   Wed Apr 21 14:56:36 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rBA452996ae951478853af3c1bcac3e0e1a26a6cab4

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

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

M	space_view3d_copy_attributes.py

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

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?



More information about the Bf-extensions-cvs mailing list