I have heard about a script that applys the deformation caused by a armature to a mesh. But, I can’t find it. Does anyone know where you find this?
dante
I have heard about a script that applys the deformation caused by a armature to a mesh. But, I can’t find it. Does anyone know where you find this?
dante
"""
Name: Apply_def.py
Creator: Martin "theeth" Poirier
E-mail: [email protected]
Purpose: Apply the deformation of a selected mesh permanently
How: load in Blender and press Alt-P after select the mesh you want to affect.
"""
import sys
import Blender
original = Blender.Object.GetSelected()[0]
if repr(type(original.data)) == "<type 'NMesh'>":
mesh = Blender.NMesh.GetRawFromObject(original.name)
final = Blender.NMesh.PutRaw(mesh, str("Deformed " + original.name))
final.size = original.size
final.rot = original.rot
final.loc = original.loc
final.name = str("Deformed " + original.name)
print "success!"
else: print "error!"
sys.stdout.flush()
Theeth wrote that one. I am sure he won’t mind it being posted here…he gave it to the community several months ago
I don’t mind at all.
It’s also in the script list thread, of course.
Martin
Does it work for 2.28 ?
I get .
Using a clean Global Dictionary.
Run Python script “much armature.txt” …
In Object_GetSelected()
error ! !
did you select a mesh?
Martin
yessss…
Use python 2.2 not 2.3.
It works for me in 2.27. Until now , I never tried it in version 2.28. I am using Python 2.2 here. I have not downloaded 2.28a, as of yet.
Maybe…
And this is why I have at least 10 different versions of this program.
I do not understand why the colored layers did not make the 2.28 release.
This version works with both API (so it works in pretty much every version of blender except 2.14).
http://clubinfo.bdeb.qc.ca/~theeth/Apply_def.py
Martin
Thanks! Theeth, you are a life saver!
dante
coo that one works,
I get this "
Using a clean Global Dictionary.
Run Python script “Apply_def.py” …
In Object_GetSelected()
[‘clrParent’, ‘getData’, ‘getDeltaLocation’, ‘getDrawMode’, ‘getDrawType’, ‘getEuler’, ‘getInverseMatrix’, ‘getLocation’, ‘getMaterials’, ‘getMatrix’, ‘getName’, ‘getParent’, ‘getTracked’, ‘getType’, ‘link’, ‘makeParent’, ‘materialUsage’, ‘setDeltaLocation’, ‘setDrawMode’, ‘setDrawType’, ‘setEuler’, ‘setLocation’, ‘setMaterials’, ‘setName’, ‘shareFrom’]
Traceback (most recent call last):
File “Apply_def.py”, line 30, in ?
AttributeError: expected three float arguments
"
But It still works…
GREAT SCRIPT !
I was begging for this feature to be included in Blender for months !
It’s also in the script list thread, of course.
mmm actually I think this one was missed.
Thanx Martin !
for some reason it only works in 2.28 for me, but hey as long as it works!
Try to look for in the directory “.blender/scripts” of one of
the last cvs compilation.
The name of the script is perhaps not clear :
“fixfromarmature.py.”
Shorter, work with blender 2.33 and there is no problem
to rename the mesh. Apply also lattice, rvk and parenting
displacement (but not resizing nor rotation).
Should be found in the generators scripts menu of the scripts windows
but for some reason, it does not appear in my script menu.
In fact, it does not work with the last softbodies build for window.
But there is no problem in the current bf-blender cvs.
I am using bf-build 2.33 and there IS no generator section in the scripts window…
perhaps i need to download a test build that has this included or just download the script…
dante
generator what in the who window? i just loaded in text window and pressed alt P.
You can find the last bf-blender build for win32 at:
http://www.netconnexion.ca/~gbeloin/elysiun/build/bfblender20040617.zip