Trolling? Despite the rudeness, I’ll post the lines that need to be corrected.
Line 77:
WSTargetVertsCo = [v.co*targetObject.matrix_world for v in targetObject.data.vertices]
Change to:
WSTargetVertsCo = [targetObject.matrix_world * v.co for v in targetObject.data.vertices]
Line 106: v.co = v.co * baseObj.matrix_world
Change to: v.co = baseObj.matrix_world * v.co
@ashsselkayi
sorry about the rudeness !!! I didn´t mean to, man. I put a smile in there right?
well let´s see, if I can do this thing, sorry if I was rude dude, peace and prosperity.
hi all.
I have also taken a look into this very valuable and usefull script. I found one code glitch in it, which sometimes yields a program error. I fixed it after talking to one of the core blender coders, who explained to me what was going wrong and how to do it right.
I also added a little bit of functionality which may be interesting for some people.
here’s a snippet, for simple weight copy from a meshA to meshB, when vertcount is the same and when vertorder is the same. this is fast and 1:1, only in some case (I use it a lot personnaly in complement of the 2.49 copy weight and now yours asap !) for sure it’s a simple code.
maybe that can be useful in your addon as an option ?
import bpy
src = bpy.context.active_object
for tgt in bpy.context.selected_objects :
if tgt != src :
# prepare tgt
#groupnames = tgt.vertex_groups.keys() # looks ok.. ?
for groupname in tgt.vertex_groups.keys() : # groupnames
group = tgt.vertex_groups[groupname]
tgt.vertex_groups.remove(group)
# copy vertexgroup from src to tgt
for groupname in src.vertex_groups.keys() :
tgt.vertex_groups.new(groupname)
# fill tgt
for vi,v in enumerate(src.data.vertices) :
for gr in v.groups :
groupid = gr.group
tgt.vertex_groups[groupid].add(index=[vi], weight=gr.weight, type='ADD')
However none of the GUI stuff was in the script when I wrote it (which was for 2.49!) and it’s been extensively improved since then by other people (which is good) so I’ve not carried out detailed checking to see if it all works - simply fixed the bug.
I hate to necro a thread on my first post ever, but I’ve been looking for a current version of this tool compatible with blender 2.75 64bit. This would be great or at least an equivalent functioning feature in blender or add-on.
No problem to start with … (for me) … but tell please what goes wrong and where you found which version :yes:, then on can check more easily and can try to solve problems for you.
from above taken
initSceneProperties(bpy.context.scene) #PKHG>9sep15 is this one offending line at your version too?
copy it after the comment of def main …
then remove it (above)
Then loading errors are away if you know what to do further … and I got the menu for it
4 rows:
interpolation …
Only…
copy…
and button: Copy Bone Weight